Commit 36eec73f authored by Libor Peltan's avatar Libor Peltan

evshed: don't unlock heap-lock on callback call to prevent race

parent ffa9cfe1
......@@ -85,9 +85,7 @@ static int evsched_run(dthread_t *thread)
if (timercmp_ge(&dt, &ev->tv)) {
heap_delmin(&sched->heap);
pthread_mutex_unlock(&sched->heap_lock);
ev->cb(ev);
pthread_mutex_lock(&sched->heap_lock);
} else {
/* Wait for next event or interrupt. Unlock calendar. */
struct timespec ts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment