#linux #futex

linux-futex

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

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

#310 in Unix APIs

Download history 183/week @ 2023-10-20 139/week @ 2023-10-27 266/week @ 2023-11-03 131/week @ 2023-11-10 111/week @ 2023-11-17 164/week @ 2023-11-24 106/week @ 2023-12-01 113/week @ 2023-12-08 136/week @ 2023-12-15 58/week @ 2023-12-22 108/week @ 2023-12-29 242/week @ 2024-01-05 224/week @ 2024-01-12 145/week @ 2024-01-19 155/week @ 2024-01-26 156/week @ 2024-02-02

752 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