mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
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:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user