Commit c7d379cd authored by Daniel Salzman's avatar Daniel Salzman

Merge branch 'evshed_nounlock' into 'master'

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

See merge request !680
parents ffa9cfe1 36eec73f
......@@ -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