Mark3 Realtime Kernel
|
The MessagePool Class The MessagePool class implements a simple allocator for message objects exchanged between threads. The sender allocates (pop's) messages, then sends them to the receiver. Upon receipt, it is the receiver's responsibility to deallocate (push) the message back to the pool. More...
#include <message.h>
Public Member Functions | |
void * | operator new (size_t sz, void *pv) |
~MessagePool () | |
void | Init () |
Init. More... | |
void | Push (Message *pclMessage_) |
Push. More... | |
Message * | Pop () |
Pop. More... | |
Message * | GetHead () |
GetHead. More... | |
Private Attributes | |
TypedDoubleLinkList< Message > | m_clList |
Linked list used to manage the Message objects. More... | |
The MessagePool Class The MessagePool class implements a simple allocator for message objects exchanged between threads. The sender allocates (pop's) messages, then sends them to the receiver. Upon receipt, it is the receiver's responsibility to deallocate (push) the message back to the pool.
Message * Mark3::MessagePool::GetHead | ( | ) |
GetHead.
Return a pointer to the first element in the message list
Definition at line 52 of file message.cpp.
void Mark3::MessagePool::Init | ( | void | ) |
|
inline |
Message * Mark3::MessagePool::Pop | ( | ) |
Pop.
Pop a message from the queue, returning it to the user to be popu32ated before sending by a transmitter.
Definition at line 41 of file message.cpp.
void Mark3::MessagePool::Push | ( | Message * | pclMessage_ | ) |
Push.
Return a previously-claimed message object back to the queue. used once the message has been processed by a receiver.
pclMessage_ | Pointer to the Message object to return back to the queue |
Definition at line 32 of file message.cpp.
|
private |