diff options
| author | Tomoaki Kawada <kawada@kmckk.co.jp> | 2022-02-10 11:26:46 +0900 |
|---|---|---|
| committer | Tomoaki Kawada <kawada@kmckk.co.jp> | 2022-02-10 11:35:37 +0900 |
| commit | 1d180caf1a14b3316652fa856499e44abec393b2 (patch) | |
| tree | 7c78e07bec489da6c0bec942bc28c33e636536d7 /library/std/src | |
| parent | bdc9508bb6e227979045c5ba3937151635a32ec0 (diff) | |
| download | rust-1d180caf1a14b3316652fa856499e44abec393b2.tar.gz rust-1d180caf1a14b3316652fa856499e44abec393b2.zip | |
kmc-solid: Wait queue should be sorted in the descending order of task priorities
In ITRON, lower priority values mean higher priorities.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/itron/condvar.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/itron/condvar.rs b/library/std/src/sys/itron/condvar.rs index 84b0f4c866a..2992a6a5429 100644 --- a/library/std/src/sys/itron/condvar.rs +++ b/library/std/src/sys/itron/condvar.rs @@ -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`. |
