Commit 39cc9c7a authored by Dominik Taborsky's avatar Dominik Taborsky

events: revert back to the race condition to avoid deadlock, unlock scheduler...

events: revert back to the race condition to avoid deadlock, unlock scheduler when running event callback
parent 4cb8d9ea
......@@ -85,7 +85,9 @@ 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