132 #ifndef ti_sysbios_knl_Mailbox__include 133 #define ti_sysbios_knl_Mailbox__include 147 #define ti_sysbios_knl_Mailbox_long_names 148 #include "Mailbox_defs.h" 161 #define Mailbox_A_invalidBufSize "Mailbox_create's bufSize parameter is invalid (too small)" 171 struct Mailbox_MbxElem {
182 typedef struct Mailbox_MbxElem Mailbox_MbxElem;
184 #define Mailbox_maxTypeAlign (sizeof (long long)) 273 unsigned int numMsgs;
306 unsigned int numFreeMsgs;
321 } Mailbox_Module_State;
444 extern bool Mailbox_pend(Mailbox_Handle mailbox,
void * msg, uint32_t timeout);
488 extern bool Mailbox_peek(Mailbox_Handle mailbox,
void * msg, uint32_t timeout);
533 extern bool Mailbox_post(Mailbox_Handle mailbox,
void * msg, uint32_t timeout);
578 extern bool Mailbox_putHead(Mailbox_Handle mailbox,
void * msg, uint32_t timeout);
618 return ((Mailbox_Handle)str);
626 #define Mailbox_module ((Mailbox_Module_State *) &(Mailbox_Module_state)) 636 #undef ti_sysbios_knl_Mailbox_long_names 637 #include "Mailbox_defs.h" bool Mailbox_post(Mailbox_Handle mailbox, void *msg, uint32_t timeout)
Post a message to mailbox.
Event_Handle readerEvent
Mailbox not empty event if using Events. Default is null.
Definition: Mailbox.h:202
Mailbox_Handle Mailbox_construct(Mailbox_Struct *obj, size_t msgSize, unsigned int numMsgs, const Mailbox_Params *prms, Error_Block *eb)
Construct a task.
Definition: Semaphore.h:312
unsigned int writerEventId
Mailbox not full event Id if using Events.
Definition: Mailbox.h:226
unsigned int bufSize
The size of the buffer that 'buf' references.
Definition: Mailbox.h:257
size_t Mailbox_getMsgSize(Mailbox_Handle mailbox)
Get the message size.
Mailbox_Handle Mailbox_Object_first(void)
return handle of the first Mailbox on Mailbox list
void Mailbox_Params_init(Mailbox_Params *prms)
Initialize the Mailbox_Params structure with default values.
int Mailbox_getNumFreeMsgs(Mailbox_Handle mailbox)
Get the number messages available for use.
Opaque queue element.
Definition: Queue.h:204
bool Mailbox_peek(Mailbox_Handle mailbox, void *msg, uint32_t timeout)
Peek a message from the mailbox.
Definition: Mailbox.h:187
unsigned int readerEventId
Mailbox not empty event Id if using Events. Default is 1.
Definition: Mailbox.h:210
bool Mailbox_putHead(Mailbox_Handle mailbox, void *msg, uint32_t timeout)
Post a message to mailbox.
Error block.
Definition: Error.h:152
int Mailbox_getNumPendingMsgs(Mailbox_Handle mailbox)
Get the number of messages that are ready to be read.
Event_Handle writerEvent
Mailbox not full event if using Events. Default is null.
Definition: Mailbox.h:218
IHeap_Handle heap
The IHeap instance used for dynamic creates.
Definition: Mailbox.h:194
void Mailbox_delete(Mailbox_Handle *mailbox)
Delete a mailbox.
bool Mailbox_pend(Mailbox_Handle mailbox, void *msg, uint32_t timeout)
Wait for a message from mailbox.
Definition: Mailbox.h:262
void * buf
The address of the buffer used for creating messages.
Definition: Mailbox.h:251
struct Mailbox_Struct * Mailbox_Handle
Definition: Mailbox.h:316
Mailbox_Handle Mailbox_create(size_t msgSize, unsigned int numMsgs, const Mailbox_Params *prms, Error_Block *eb)
Create a mailbox.
void Mailbox_destruct(Mailbox_Struct *obj)
Destruct a mailbox.
Mailbox_Handle Mailbox_Object_next(Mailbox_Handle mbx)
return handle of the next Mailbox on Mailbox list