|
The Pedigree Project 0.1
|
#include <Rcu.h>
Collaboration diagram for RcuRetireQueue:Classes | |
| struct | Entry |
Public Types | |
| using | Reclaim = void(*)(void *) |
Public Member Functions | |
| void | retire (void *object, Reclaim reclaim) |
| void | drain () |
Static Public Attributes | |
| static constexpr size_t | Capacity = 32 |
Private Member Functions | |
| NOT_COPYABLE_OR_ASSIGNABLE (RcuRetireQueue) | |
| void | drainLocked () |
Private Attributes | |
| Mutex | m_Lock |
| struct RcuRetireQueue::Entry | m_Entries [Capacity] |
| size_t | m_Count = 0 |
Bounded deferred reclamation for a writer-owned lifetime domain.
A full queue applies synchronous backpressure. Call drain() before releasing callback code or its owner (in particular before module unload); destruction also drains. Callbacks reclaim storage in task context and must not invoke queue operations. Do not enqueue while holding locks needed by a callback.
| void RcuRetireQueue::retire | ( | void * | object, |
| Reclaim | reclaim | ||
| ) |