Mark3 Realtime Kernel
|
The Notify class. This class provides a blocking object type that allows one or more threads to wait for an event to occur before resuming operation. More...
#include <notify.h>
Public Member Functions | |
void * | operator new (size_t sz, void *pv) |
~Notify () | |
void | Init (void) |
Init Initialze the Notification object prior to use. More... | |
void | Signal (void) |
Signal Signal the notification object. This will cause the highest priority thread currently blocking on the object to wake. If no threads are currently blocked on the object, the call has no effect. More... | |
void | Wait (bool *pbFlag_) |
Wait Block the current thread, waiting for a signal on the object. More... | |
bool | Wait (uint32_t u32WaitTimeMS_, bool *pbFlag_) |
Wait Block the current thread, waiting for a signal on the object. More... | |
void | WakeMe (Thread *pclChosenOne_) |
WakeMe Wake the specified thread from its current blocking queue. Note that this is only public in order to be accessible from a timer callack. More... | |
Public Member Functions inherited from Mark3::BlockingObject | |
BlockingObject () | |
~BlockingObject () | |
Private Attributes | |
bool | m_bPending |
Additional Inherited Members | |
Protected Member Functions inherited from Mark3::BlockingObject | |
void | Block (Thread *pclThread_) |
Block Blocks a thread on this object. This is the fundamental operation performed by any sort of blocking operation in the operating system. All semaphores/mutexes/sleeping/messaging/etc ends up going through the blocking code at some point as part of the code that manages a transition from an "active" or "waiting" thread to a "blocked" thread. More... | |
void | BlockPriority (Thread *pclThread_) |
BlockPriority Same as Block(), but ensures that threads are added to the block-list in priority-order, which optimizes the unblock procedure. More... | |
void | UnBlock (Thread *pclThread_) |
UnBlock Unblock a thread that is already blocked on this object, returning it to the "ready" state by performing the following steps: More... | |
void | SetInitialized (void) |
SetInitialized. More... | |
bool | IsInitialized (void) |
IsInitialized. More... | |
Protected Attributes inherited from Mark3::BlockingObject | |
ThreadList | m_clBlockList |
uint8_t | m_u8Initialized |
Static Protected Attributes inherited from Mark3::BlockingObject | |
static constexpr auto | m_uBlockingInvalidCookie = uint8_t { 0x3C } |
static constexpr auto | m_uBlockingInitCookie = uint8_t { 0xC3 } |
The Notify class. This class provides a blocking object type that allows one or more threads to wait for an event to occur before resuming operation.
Mark3::Notify::~Notify | ( | ) |
Definition at line 47 of file notify.cpp.
void Mark3::Notify::Init | ( | void | ) |
Init Initialze the Notification object prior to use.
Definition at line 57 of file notify.cpp.
|
inline |
void Mark3::Notify::Signal | ( | void | ) |
Signal Signal the notification object. This will cause the highest priority thread currently blocking on the object to wake. If no threads are currently blocked on the object, the call has no effect.
Definition at line 66 of file notify.cpp.
void Mark3::Notify::Wait | ( | bool * | pbFlag_ | ) |
Wait Block the current thread, waiting for a signal on the object.
pbFlag_ | Flag set to false on block, and true upon wakeup. |
Definition at line 95 of file notify.cpp.
bool Mark3::Notify::Wait | ( | uint32_t | u32WaitTimeMS_, |
bool * | pbFlag_ | ||
) |
Wait Block the current thread, waiting for a signal on the object.
u32WaitTimeMS_ | Time to wait for the notification event. |
pbFlag_ | Flag set to false on block, and true upon wakeup. |
Definition at line 125 of file notify.cpp.
void Mark3::Notify::WakeMe | ( | Thread * | pclChosenOne_ | ) |
WakeMe Wake the specified thread from its current blocking queue. Note that this is only public in order to be accessible from a timer callack.
pclChosenOne_ | Thread to wake up |
Definition at line 175 of file notify.cpp.