Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunfishcode/rustix-futex-sync
Linux futex-based synchronization
https://github.com/sunfishcode/rustix-futex-sync
Last synced: 5 days ago
JSON representation
Linux futex-based synchronization
- Host: GitHub
- URL: https://github.com/sunfishcode/rustix-futex-sync
- Owner: sunfishcode
- License: other
- Created: 2023-08-25T16:35:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-06T03:40:07.000Z (2 months ago)
- Last Synced: 2024-11-01T12:52:26.406Z (12 days ago)
- Language: Rust
- Homepage:
- Size: 89.8 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Linux futex-based implementations of [`Mutex`], [`RwLock`], [`Condvar`],
[`Once`], and [`OnceLock`], as well as [`RawMutex`], [`RawRwLock`], and
[`RawCondvar`], derived from the futex code in std, factored out to a
standalone `no_std` crate using [`rustix`] to do the futex and [`lock_api`] to
provide most of the public `Mutex` and `RwLock` API.`lock_api` does not support poisoning, so support for poisoning is omitted.
In this library, `Condvar`, `RawCondvar`, `RawMutex`, and `Once` are guaranteed
to be `repr(transparent)` wrappers around a single `AtomicU32`. `RawRwLock` is
guaranteed to be a `repr(C)` wrapper around two `AtomicU32`s. The contents of
these `AtomicU32`s are not documented, except that all these types'
`const fn new()` and `INIT` are guaranteed to initialize them to all zeros.[`Mutex`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/type.Mutex.html
[`RwLock`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/type.RwLock.html
[`Condvar`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/struct.Condvar.html
[`Once`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/struct.Once.html
[`OnceLock`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/struct.OnceLock.html
[`RawMutex`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/struct.RawMutex.html
[`RawRwLock`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/struct.RawRwLock.html
[`RawCondvar`]: https://docs.rs/rustix-futex-sync/latest/rustix_futex_sync/type.RawCondvar.html
[`rustix`]: https://github.com/bytecodealliance/rustix#readme
[`lock_api`]: https://crates.io/crates/lock_api