Add futex_wake_all.
This commit is contained in:
parent
4fbd71c943
commit
73d63488e4
1 changed files with 12 additions and 0 deletions
|
@ -66,6 +66,18 @@ pub fn futex_wake(futex: &AtomicI32) {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub fn futex_wake_all(futex: &AtomicI32) {
|
||||
unsafe {
|
||||
libc::syscall(
|
||||
libc::SYS_futex,
|
||||
futex as *const AtomicI32,
|
||||
libc::FUTEX_WAKE | libc::FUTEX_PRIVATE_FLAG,
|
||||
i32::MAX,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "emscripten")]
|
||||
pub fn futex_wake(futex: &AtomicI32) {
|
||||
extern "C" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue