#linux #futex

linux-futex

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

2 releases

0.1.1 Aug 2, 2020
0.1.0 Mar 2, 2020

#155 in Unix APIs

Download history 476/week @ 2021-08-15 450/week @ 2021-08-22 275/week @ 2021-08-29 288/week @ 2021-09-05 72/week @ 2021-09-12 59/week @ 2021-09-19 108/week @ 2021-09-26 41/week @ 2021-10-03 105/week @ 2021-10-10 155/week @ 2021-10-17 189/week @ 2021-10-24 276/week @ 2021-10-31 301/week @ 2021-11-07 391/week @ 2021-11-14 944/week @ 2021-11-21 987/week @ 2021-11-28

2,646 downloads per month
Used in 5 crates (4 directly)

BSD-2-Clause

28KB
702 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 AtomicI32 exposing all the futex operations Linux can apply to them.

Existing AtomicI32s 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 [AtomicI32] exposing all the futex operations Linux can apply to them.

Existing [AtomicI32]s can be used as futexes through [AsFutex] without changing their type.

Dependencies

~32KB