27 void TimedNotify_Callback(Thread* pclOwner_,
void* pvData_)
32 auto* pclNotify =
static_cast<Notify*
>(pvData_);
35 pclOwner_->SetExpired(
true);
38 pclNotify->WakeMe(pclOwner_);
70 auto bReschedule =
false;
75 if (
nullptr == pclCurrent) {
78 while (
nullptr != pclCurrent) {
100 auto bEarlyExit =
false;
105 if (
nullptr != pbFlag_) {
119 if (
nullptr != pbFlag_) {
130 auto bUseTimer =
false;
131 auto bEarlyExit =
false;
132 auto clNotifyTimer =
Timer {};
137 if (0u != u32WaitTimeMS_) {
141 clNotifyTimer.Init();
142 clNotifyTimer.Start(
false, u32WaitTimeMS_, TimedNotify_Callback,
this);
147 if (
nullptr != pbFlag_) {
163 clNotifyTimer.Stop();
167 if (
nullptr != pbFlag_) {
void UnBlock(Thread *pclThread_)
UnBlock Unblock a thread that is already blocked on this object, returning it to the "ready" state by...
void Block(Thread *pclThread_)
Block Blocks a thread on this object. This is the fundamental operation performed by any sort of bloc...
Mark3::Thread * g_pclCurrent
PORT_PRIO_TYPE GetCurPriority(void)
GetCurPriority Return the priority of the current thread.
void WakeMe(Thread *pclChosenOne_)
WakeMe Wake the specified thread from its current blocking queue. Note that this is only public in or...
Single include file given to users of the Mark3 Kernel API.
The Thread Class. This object providing the fundamental thread control data structures and functions ...
void SetExpired(bool bExpired_)
SetExpired Set the status of the current blocking call on the thread.
#define PANIC_ACTIVE_NOTIFY_DESCOPED
bool IsInitialized(void)
IsInitialized.
static void Yield(void)
Yield Yield the thread - this forces the system to call the scheduler and determine what thread shoul...
void Signal(void)
Signal Signal the notification object. This will cause the highest priority thread currently blocking...
void Init(void)
Init Initialze the Notification object prior to use.
void Wait(bool *pbFlag_)
Wait Block the current thread, waiting for a signal on the object.
The CriticalGuard class. This class provides an implemention of RAII for critical sections...
bool GetExpired()
GetExpired Return the status of the most-recent blocking call on the thread.
The Timer Class. This class provides kernel-managed timers, used to provide high-precision delays...
T * GetHead()
GetHead Get the head node in the linked list.
void SetInitialized(void)
SetInitialized.
static Thread * GetCurrentThread()
GetCurrentThread Return the pointer to the currently-running thread.
static void Panic(uint16_t u16Cause_)
Panic Cause the kernel to enter its panic state.