CoRoutine Scheduler implementation.
The CoList class The CoList class implements a circular-linked-listed structure for coroutine objects...
static CoList m_clStopList
static CoList * GetStopList()
GetStopList Get the pointer to the coroutine list managing initialized coroutines that are not awaiti...
void SetPrioMap(CoPrioMap *pclPrioMap_)
SetPrioMap Assign a priority map object to this co-routine list.
#define PORT_PRIO_TYPE
Type used for bitmap in the PriorityMap class.
static CoPrioMap * GetPrioMap()
GetPrioMap Get the pointer to the priority map object used by the scheduler.
static CoPrioMap m_clPrioMap
#define PORT_COROUTINE_PRIORITIES
static CoList m_aclPriorities[PORT_COROUTINE_PRIORITIES]
void SetPriority(PORT_PRIO_TYPE uPriority_)
SetPriority Set the scheduling priority of this coroutine liss; has no effect unless a SetPrioMap has...
static CoList * GetCoList(PORT_PRIO_TYPE uPriority_)
GetCoList Retrieve the coroutine list associated with a given priority.
The Coroutine class implements a lightweight, run-to-completion task that forms the basis for co-oper...
RAII Critical Section Implementation.
PriorityMapL1< PORT_PRIO_TYPE, PORT_COROUTINE_PRIORITIES > CoPrioMap
The PriorityMapL1 class This class implements a priority bitmap data structure. Each bit in the objec...
T HighestPriority(void)
HighestPriority Computes the numeric priority of the highest-priority thread represented in the prior...
The CriticalGuard class. This class provides an implemention of RAII for critical sections...
T * GetHead()
GetHead Get the head node in the linked list.
static void Init()
Init Initialize the coroutine scheduler prior to use. Must be called prior to using any other functio...
static Coroutine * Schedule()
Schedule Determine what coroutine (if any) is the next to be executed.