diff options
-rw-r--r-- | src/thread.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/thread.c b/src/thread.c index bb5ddc4..55efbe2 100644 --- a/src/thread.c +++ b/src/thread.c @@ -410,17 +410,15 @@ static void thread_runq_tick(struct thread_runq *runq) { struct thread_list *list; + unsigned int priority; assert(!cpu_intr_enabled()); assert(!thread_preempt_enabled()); - if (runq->current == runq->idle) { - return; - } - - list = thread_runq_get_list(runq, runq->current->priority); + priority = runq->current->priority; + list = thread_runq_get_list(runq, priority); - if (thread_list_singular(list)) { + if (thread_list_singular(list) && (priority != THREAD_IDLE_PRIORITY)) { return; } |