carb/container/LocklessStack.h¶
↰ Parent directory: carb/container/
Defines the LocklessStack class.
Source: carb/container/LocklessStack.h
Included By¶
carb/extras/HandleDatabase.h: HandleDatabase definition file.
Namespaces¶
carb: The main Carbonite namespace.
carb::container: Carbonite container classes.
Classes¶
carb::container::LocklessStack: Implements a lockless stack: a LIFO container that is thread-safe yet requires no kernel involvement.
carb::container::LocklessStackLink: Defines the link object.
Defines¶
DO_DCAS: If 1, we try to do double-compare-and-swap; otherwise we do a single compare-and-swap and encode the sequence by stealing some of the pointer bits. If 1 but we don’t have DCAS (ARM) then we fall back to using std::mutex Note that DCAS requires
-march=skylake
for GCC/x86_64. This is done below with a pragma.NO_DCAS: Indicates that double-compare-and-swap is not available on this platform.