Skip to main content

Crate seq_lock

Crate seq_lock 

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).