Crate linux_futex

Source
Expand description

Futex: A Linux-specific fast user-space locking primitive.

This crate provides easy-to-use wrappers around the not-so-easy-to-use SYS_futex Linux syscall.

The documentation of Linux’s futexes can be found in the relevant man page. The most important details are also explained in the documentation of this crate.

The two main types of this crate are Futex and PiFutex, which are simply wrappers containing an AtomicU32 exposing all the futex operations Linux can apply to them.

Existing AtomicU32s can be used as futexes through AsFutex without changing their type.

Modules§

op
Arguments to the wake_op function.

Structs§

Futex
A Linux-specific fast user-space locking primitive.
PiFutex
A Linux-specific priority inheriting fast user-space locking primitive.
Private
A type indicating a futex is only used from the same address space (process).
Shared
A type indicating a futex might be used from multiple address spaces (processes).

Enums§

RequeuePiError
TimedLockError
TimedRequeueError
TimedRequeuePiError
TimedWaitError
TryAgainError
WaitError
WrongValueError

Traits§

AsFutex
Use any AtomicU32 as Futex or PiFutex.
Scope
Private or Shared.
Timeout
A point in time on either the monotonic clock (Instant) or real time clock (SystemTime).