enum lfds710_btree_au_query

From liblfds.org
Revision as of 21:04, 7 May 2016 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source File



enum lfds710_btree_au_query



Performs a single-threaded count of the number of elements in the btree. The count will only be guaranteed to be accurate if no other threads are adding elements to the tree during the count. If other threads are adding elements, they will only be counted if the tree walk which is counting elements has not yet reached those new elements.


Validates the btree. Performs an in-order walk, checking every element is larger than the preceeding element. Additionally, if given an expected range of the number of elements in the tree, counts the number of elements in the tree and checks they fall within the expected range. The validation walk is thread-safe, but the count is not and if other threads are adding elements to the tree, they will not necessarily be counted, and so this could then lead to the count being improperly outside the count range specified by the caller.


This enum is used by the btree query function, lfds710_btree_au_query.

See Also