1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

kernel/tasks: fix minor bug in check_scheduling()

If the prio_bitmap is 0, msb() will return 64 which will be greater
than the current priority in any case. While this was a bug, it only
triggered a useless rescheduling and didn't affect correctness.
This commit is contained in:
daniel-k 2016-09-02 20:06:41 +02:00
parent a285a78b1b
commit 2b02744e0a

View file

@ -199,7 +199,8 @@ void check_scheduling(void)
{
if (!is_irq_enabled())
return;
if (msb(readyqueues[CORE_ID].prio_bitmap) > per_core(current_task)->prio)
if (get_highest_priority() > per_core(current_task)->prio)
reschedule();
}