Skip to main content

Module sync

Module sync 

Source
Expand description

Pure-Rust futex synchronization primitives (FutexMutex) with zero pthreads dependencies.

Structs§

FutexMutex
Move-safe, zero-allocation 3-state futex mutex (0 = unlocked, 1 = locked, 2 = contended).
FutexMutexGuard
RAII guard for FutexMutex.

Constants§

FUTEX_WAIT_PRIVATE
Private futex wait operation (FUTEX_WAIT | FUTEX_PRIVATE_FLAG).
FUTEX_WAKE_PRIVATE
Private futex wake operation (FUTEX_WAKE | FUTEX_PRIVATE_FLAG).

Functions§

futex_wait
Waits on futex word while its value equals expected, with an optional relative timeout.
futex_wake_all
Wakes all waiters blocked on futex word.
futex_wake_one
Wakes at most one waiter blocked on futex word.