mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
Kernel: Implement FUTEX_WAKE of arbitrary count.
Previously we just woke all waiters no matter how many were requested. Fix this by implementing WaitQueue::wake_n(..).
This commit is contained in:
parent
e8f6f655bf
commit
1f64e3eb16
3 changed files with 17 additions and 2 deletions
|
@ -4636,8 +4636,7 @@ int Process::sys$futex(const Syscall::SC_futex_params* user_params)
|
|||
if (value == 1) {
|
||||
futex_queue(userspace_address).wake_one();
|
||||
} else {
|
||||
// FIXME: Wake exactly (value) waiters.
|
||||
futex_queue(userspace_address).wake_all();
|
||||
futex_queue(userspace_address).wake_n(value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue