CoRoutine Scheduler implementation.
CoRoutine implementation.
static CoList * GetStopList()
GetStopList Get the pointer to the coroutine list managing initialized coroutines that are not awaiti...
Kernel initialization and startup class.
CoroutineHandler m_pfHandler
PORT_PRIO_TYPE m_uPriority
#define PANIC_ACTIVE_COROUTINE_DESCOPED
void Add(Coroutine *pclCoroutine_)
Add Add a coroutine object to this list.
#define PORT_PRIO_TYPE
Type used for bitmap in the PriorityMap class.
void Activate()
Activate Tag the co-routine as pending execution. Has no effect if the co-routine is already pending ...
void SetPriority(PORT_PRIO_TYPE uPriority_)
SetPriority Update the scheduling priority of the co-routine. Can be called from within the co-routin...
static CoList * GetCoList(PORT_PRIO_TYPE uPriority_)
GetCoList Retrieve the coroutine list associated with a given priority.
void(*)(Coroutine *pclCaller_, void *pvContext_) CoroutineHandler
PORT_PRIO_TYPE GetPriority()
GetPriority Retrieve the current scheduling priority of the co-routine.
RAII Critical Section Implementation.
void Run()
Run Clear the co-routine's pending execution flag, and execute the coroutine's handler function...
The CriticalGuard class. This class provides an implemention of RAII for critical sections...
void Init(PORT_PRIO_TYPE uPriority_, CoroutineHandler pfHandler_, void *pvContext_)
Init Initialize the coroutine object prior to use. Must be called before using the other methods in t...
void Remove(Coroutine *pclCoroutine_)
Remove Remove a given coroutine object from this list.
static void Panic(uint16_t u16Cause_)
Panic Cause the kernel to enter its panic state.