folly::bskip_detail::BSkipNode

Common base of leaf and internal nodes: next pointer, seqlock, and mutex.

Synopsis

Declared in <folly/ConcurrentBSkipList-detail.h>

template<typename Traits>
struct BSkipNode;

Type Aliases

NameDescription
KeyStorage The key slot storage type.
Seq The seqlock type used to bracket concurrent access.
T The key type.

Member Functions

NameDescription
BSkipNode [constructor]Constructs a node and registers its fields with the thread sanitizer.
loadNextMinKey Loads the minimum key of the successor node.

Protected Member Functions

NameDescription
annotateBaseRaces Registers the node's shared fields with the thread sanitizer as benign races.

Protected Data Members

NameDescription
level_ Node level; set once at allocation and immutable thereafter.
mutex_ Shared/exclusive mutex guarding locked-path access.
nextMinKey_ Cached minimum key of the successor node.
next_ Pointer to the next node at this level; readers pair load(acquire) with the release in publishSplitSibling.
numElements_ Number of live elements in this node.
seq_ Seqlock bracketing optimistic reads of this node.

Friends

NameDescription
folly::bskip_detail::AdaptiveReadGuardRAII read guard that starts optimistic and escalates to the shared lock when a writer is in flight.
folly::ConcurrentBSkipListConcurrent B-skip-list container; declared here for friend declarations.

Derived Classes

NameDescription
BSkipNodeInternal Internal (routing) node holding separator keys and child pointers.
BSkipNodeLeaf Leaf node holding sorted keys, optional payloads, and tombstone bits.

Template Parameters

NameDescription
TraitsThe InternalTraits for the list.