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:
parent
a285a78b1b
commit
2b02744e0a
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue