Skip to content
Snippets Groups Projects
Commit 39cc9c7a authored by Dominik Taborsky's avatar Dominik Taborsky
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment