Skip to content

Commit

Permalink
kmc-solid: Wait queue should be sorted in the descending order of tas…
Browse files Browse the repository at this point in the history
…k priorities

In ITRON, lower priority values mean higher priorities.
  • Loading branch information
kawadakk committed Feb 10, 2022
1 parent bdc9508 commit 1d180ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/itron/condvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mod waiter_queue {
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`.
Expand Down

0 comments on commit 1d180ca

Please sign in to comment.