5 releases (1 stable)

1.0.0 Jun 7, 2024
0.2.0 Jan 9, 2023
0.1.2 Aug 14, 2022
0.1.1 Aug 2, 2020
0.1.0 Mar 2, 2020

#56 in Unix APIs

Download history 298/week @ 2024-07-19 303/week @ 2024-07-26 145/week @ 2024-08-02 157/week @ 2024-08-09 186/week @ 2024-08-16 233/week @ 2024-08-23 128/week @ 2024-08-30 1126/week @ 2024-09-06 2318/week @ 2024-09-13 2243/week @ 2024-09-20 2428/week @ 2024-09-27 3103/week @ 2024-10-04 2999/week @ 2024-10-11 2627/week @ 2024-10-18 2236/week @ 2024-10-25 2666/week @ 2024-11-01

11,352 downloads per month
Used in 20 crates (7 directly)

BSD-2-Clause

29KB
716 lines

linux-futex

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.


lib.rs:

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.

Dependencies

~44KB