Skip to content

Commit 1d180ca

Browse files
committed
kmc-solid: Wait queue should be sorted in the descending order of task priorities
In ITRON, lower priority values mean higher priorities.
1 parent bdc9508 commit 1d180ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/itron/condvar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ mod waiter_queue {
192192
let insert_after = {
193193
let mut cursor = head.last;
194194
loop {
195-
if waiter.priority <= cursor.as_ref().priority {
195+
if waiter.priority >= cursor.as_ref().priority {
196196
// `cursor` and all previous waiters have the same or higher
197197
// priority than `current_task_priority`. Insert the new
198198
// waiter right after `cursor`.

0 commit comments

Comments
 (0)