4 releases

0.2.0 Jan 9, 2023
0.1.2 Aug 14, 2022
0.1.1 Aug 2, 2020
0.1.0 Mar 2, 2020

#391 in Unix APIs

Download history 62/week @ 2023-12-14 14/week @ 2023-12-21 37/week @ 2023-12-28 129/week @ 2024-01-04 170/week @ 2024-01-11 119/week @ 2024-01-18 88/week @ 2024-01-25 133/week @ 2024-02-01 117/week @ 2024-02-08 113/week @ 2024-02-15 166/week @ 2024-02-22 137/week @ 2024-02-29 128/week @ 2024-03-07 110/week @ 2024-03-14 166/week @ 2024-03-21 85/week @ 2024-03-28

505 downloads per month
Used in 6 crates (5 directly)

BSD-2-Clause

29KB
712 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

~42KB