mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Fix futex lost wakeup
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
9da6af0394
commit
6c4f56723c
@ -253,7 +253,9 @@ impl FutexBucket {
|
||||
}
|
||||
|
||||
let item = item_cursor.remove().unwrap();
|
||||
item.wake();
|
||||
if !item.wake() {
|
||||
continue;
|
||||
}
|
||||
count += 1;
|
||||
}
|
||||
|
||||
@ -323,8 +325,9 @@ impl FutexItem {
|
||||
(futex_item, waiter)
|
||||
}
|
||||
|
||||
pub fn wake(&self) {
|
||||
self.waker.wake_up();
|
||||
#[must_use]
|
||||
pub fn wake(&self) -> bool {
|
||||
self.waker.wake_up()
|
||||
}
|
||||
|
||||
pub fn match_up(&self, another: &Self) -> bool {
|
||||
|
Reference in New Issue
Block a user