Data Structures
This chapter covers the general-purpose data structures LibXR uses for task scheduling, data communication and resource management.
Features
- Interfaces are platform-independent.
- Capacity is fixed at construction.
SPSCQueue,MPMCQueueandStackallocate their storage at construction;QueueandObjectPoolcan use caller-provided storage andDoubleBufferuses only caller-provided storage; nodes ofList,LockFreeListandRBTreeare owned by the caller. Reads and writes after construction do not allocate. Stack,ListandRBTreeuse a mutex and cannot be used in interrupts;SPSCQueueandLockFreeListare lock-free;MPMCQueuesupports multiple producers and consumers.
Contents
- Queue (ordinary FIFO)
- SPSCQueue
- MPMCQueue
- SlotPool
- Stack
- List
- LockFreeList
- ObjectPool
- LatestSnapshot
- RBTree
- DoubleBuffer
For usage, performance comparisons, and application scenarios, see the individual pages.