kmc-solid: Wait queue should be sorted in the descending order of task priorities
In ITRON, lower priority values mean higher priorities.
This commit is contained in:
parent
bdc9508bb6
commit
1d180caf1a
@ -192,7 +192,7 @@ pub unsafe fn insert(&mut self, mut waiter_ptr: NonNull<Waiter>) {
|
||||
let insert_after = {
|
||||
let mut cursor = head.last;
|
||||
loop {
|
||||
if waiter.priority <= cursor.as_ref().priority {
|
||||
if waiter.priority >= cursor.as_ref().priority {
|
||||
// `cursor` and all previous waiters have the same or higher
|
||||
// priority than `current_task_priority`. Insert the new
|
||||
// waiter right after `cursor`.
|
||||
|
Loading…
Reference in New Issue
Block a user