1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

Add missing woken in futex

This commit is contained in:
Jiajie Chen 2020-06-19 21:30:26 +08:00
parent 4af73f5650
commit 8bc8ab19e2

View File

@ -31,7 +31,9 @@ impl Futex {
let mut inner = self.inner.lock();
for i in 0..wake_count {
if let Some(waiter) = inner.waiters.pop_front() {
if let Some(waker) = waiter.lock().waker.take() {
let mut waiter = waiter.lock();
waiter.woken = true;
if let Some(waker) = waiter.waker.take() {
waker.wake();
}
} else {