The Pedigree Project 0.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
RequestQueueCallbackScope Class Reference
+ Collaboration diagram for RequestQueueCallbackScope:

Public Member Functions

 RequestQueueCallbackScope (RequestQueue *queue, RequestQueue::PreallocatedRequest *releasingToken=nullptr)
 

Static Public Member Functions

static bool contains (const RequestQueue *queue)
 
static bool allowsReleaseHandoff (const RequestQueue *queue, const RequestQueue::PreallocatedRequest *token)
 

Private Member Functions

 RequestQueueCallbackScope (const RequestQueueCallbackScope &)=delete
 
RequestQueueCallbackScope & operator= (const RequestQueueCallbackScope &)=delete
 
void restore ()
 

Static Private Member Functions

static void abandon (void *context)
 

Private Attributes

RequestQueue * m_Queue
 
RequestQueue::PreallocatedRequest * m_ReleasingToken
 
Thread * m_Thread
 
size_t m_StateLevel
 
RequestQueueCallbackScope * m_Previous
 
AtomicStateCleanupRecord m_Cleanup
 
bool m_Active
 

Detailed Description

Marks a derived RequestQueue callback on the current Thread state stack.

The cleanup record is needed because a terminal path can abandon a callback stack without executing this scope's destructor. Nested event states inherit the head pointer, so they cannot re-enter the same queue around an outer callback either.

Definition at line 64 of file RequestQueue.cc.

Constructor & Destructor Documentation

◆ RequestQueueCallbackScope()

RequestQueueCallbackScope::RequestQueueCallbackScope ( RequestQueue *  queue,
RequestQueue::PreallocatedRequest *  releasingToken = nullptr 
)
inline

Definition at line 66 of file RequestQueue.cc.

◆ ~RequestQueueCallbackScope()

RequestQueueCallbackScope::~RequestQueueCallbackScope ( )
inline

Definition at line 92 of file RequestQueue.cc.

Member Function Documentation

◆ abandon()

static void RequestQueueCallbackScope::abandon ( void *  context)
inlinestaticprivate

Definition at line 143 of file RequestQueue.cc.

◆ allowsReleaseHandoff()

static bool RequestQueueCallbackScope::allowsReleaseHandoff ( const RequestQueue *  queue,
const RequestQueue::PreallocatedRequest *  token 
)
inlinestatic

Definition at line 121 of file RequestQueue.cc.

◆ contains()

static bool RequestQueueCallbackScope::contains ( const RequestQueue *  queue)
inlinestatic

Definition at line 104 of file RequestQueue.cc.

◆ restore()

void RequestQueueCallbackScope::restore ( )
inlineprivate

Definition at line 150 of file RequestQueue.cc.

Member Data Documentation

◆ m_Active

bool RequestQueueCallbackScope::m_Active
private

Definition at line 173 of file RequestQueue.cc.

◆ m_Cleanup

AtomicStateCleanupRecord RequestQueueCallbackScope::m_Cleanup
private

Definition at line 172 of file RequestQueue.cc.

◆ m_Previous

RequestQueueCallbackScope* RequestQueueCallbackScope::m_Previous
private

Definition at line 171 of file RequestQueue.cc.

◆ m_Queue

RequestQueue* RequestQueueCallbackScope::m_Queue
private

Definition at line 167 of file RequestQueue.cc.

◆ m_ReleasingToken

RequestQueue::PreallocatedRequest* RequestQueueCallbackScope::m_ReleasingToken
private

Definition at line 168 of file RequestQueue.cc.

◆ m_StateLevel

size_t RequestQueueCallbackScope::m_StateLevel
private

Definition at line 170 of file RequestQueue.cc.

◆ m_Thread

Thread* RequestQueueCallbackScope::m_Thread
private

Definition at line 169 of file RequestQueue.cc.


The documentation for this class was generated from the following file: