The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DeferredTimeAccountingWorkerState Class Reference

#include <DeferredTimeAccounting.h>

+ Collaboration diagram for DeferredTimeAccountingWorkerState:

Public Member Functions

void publish ()
 
size_t beginBatch ()
 
void finishBatch (size_t generation)
 
bool ready (bool stopping=false) const
 
bool caughtUp () const
 

Private Member Functions

 DeferredTimeAccountingWorkerState (const DeferredTimeAccountingWorkerState &)=delete
 
DeferredTimeAccountingWorkerStateoperator= (const DeferredTimeAccountingWorkerState &)=delete
 

Private Attributes

size_t m_Published
 
size_t m_Completed
 
size_t m_Active
 

Detailed Description

Lost-wakeup-free readiness state for one accounting worker.

Definition at line 183 of file DeferredTimeAccounting.h.

Constructor & Destructor Documentation

◆ DeferredTimeAccountingWorkerState()

DeferredTimeAccountingWorkerState::DeferredTimeAccountingWorkerState ( )
inline

Definition at line 185 of file DeferredTimeAccounting.h.

Member Function Documentation

◆ beginBatch()

size_t DeferredTimeAccountingWorkerState::beginBatch ( )
inline

Marks the worker active and snapshots the generation it will drain.

Definition at line 193 of file DeferredTimeAccounting.h.

◆ caughtUp()

bool DeferredTimeAccountingWorkerState::caughtUp ( ) const
inline

Definition at line 208 of file DeferredTimeAccounting.h.

◆ finishBatch()

void DeferredTimeAccountingWorkerState::finishBatch ( size_t  generation)
inline

Completes only the snapshotted generation, preserving racing work.

Definition at line 199 of file DeferredTimeAccounting.h.

◆ publish()

void DeferredTimeAccountingWorkerState::publish ( )
inline

Records one publication before the scheduler doorbell is rung.

Definition at line 188 of file DeferredTimeAccounting.h.

Referenced by PerProcessorScheduler::publishDeferredTimeAccounting().

+ Here is the caller graph for this function:

◆ ready()

bool DeferredTimeAccountingWorkerState::ready ( bool  stopping = false) const
inline

Definition at line 204 of file DeferredTimeAccounting.h.

Member Data Documentation

◆ m_Active

size_t DeferredTimeAccountingWorkerState::m_Active
private

Definition at line 216 of file DeferredTimeAccounting.h.

◆ m_Completed

size_t DeferredTimeAccountingWorkerState::m_Completed
private

Definition at line 215 of file DeferredTimeAccounting.h.

◆ m_Published

size_t DeferredTimeAccountingWorkerState::m_Published
private

Definition at line 214 of file DeferredTimeAccounting.h.


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