MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / wake

Function wake

src/thread/futex.rs:85–88  ·  view source on GitHub ↗
(uaddr: &AtomicU32, flags: Flags, val: u32)

Source from the content-addressed store, hash-verified

83/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html
84#[inline]
85pub fn wake(uaddr: &AtomicU32, flags: Flags, val: u32) -> io::Result<usize> {
86 // SAFETY: The raw pointers come from references or null.
87 unsafe { futex_val2(uaddr, Operation::Wake, flags, val, 0, ptr::null(), 0) }
88}
89
90/// `syscall(SYS_futex, uaddr, FUTEX_FD, val, NULL, NULL, 0)`
91///

Callers 2

test_wait_wakeFunction · 0.85
test_waitv_wakeFunction · 0.85

Calls 1

futex_val2Function · 0.50

Tested by 2

test_wait_wakeFunction · 0.68
test_waitv_wakeFunction · 0.68