Module atomic_try_update::bits
source · Expand description
Bit packing and pointer alignment utilities that make it easier to fit
additional state into an Atom<T>
Structs
- A wrapper around an instance of T that is aligned on an eight byte boundary. This allows FlagPtr to steal the bottom three bits of pointers to instances of T without worrying about T’s alignment requirements.
- A packed pointer type that steals some bits to make room for a 3-bit flag
- Bottom bit is the flag; you get 31 bits for val.
- Bottom bit is the flag; you get 63 bits for val.