Skip to main content
Crate seq_lock
seq_
lock
All Items
Crate Items
Structs
Functions
Crate
seq_
lock
Copy item path
Source
Structs
§
SeqLock
Declare an instance of
SeqLock
by supplying header([
H
]) and value([
T
]) types, which should be configured with C-style layout & alignment.
SeqLock
will place a 32-bit atomic sequence number in-between the header and value, in a VMO.
Functions
§
atomic_
fetch_
add_
u32_
acq_
rel
⚠
This performs an atomic fetch-add with Acquire and Release ordering of
val
to a 32-bit value at
ptr
. Use this to update the u32 lock.
atomic_
store_
u32_
release
⚠
This performs an atomic store-release of a 32-bit value to
addr
. Use this if you have a u32 or your struct is align(4).