Mailboxes
4-66
Example 4-14. Posting a Message to a Mailbox
4.8.1 MBX Example
Example 4-15 provides sample code showing two types of tasks created
statically: a single reader task which removes messages from the mailbox,
and multiple writer tasks which insert messages into the mailbox. The
resultant trace from Example 4-15 is shown in Figure 4-15.
Note:
When called within an HWI, the code sequence calling MBX_post must be
either wrapped within an HWI_enter/HWI_exit pair or invoked by the HWI
dispatcher.
Bool MBX_post(mbx, msg, timeout)
MBX_Handle mbx;
Void *msg;
Uns timeout; /* return after this many */
/* system clock ticks */
Bool MBX_post(mbx, msg, timeout)
MBX_Handle mbx;
Void *msg;
Uns timeout; /* return after this many */
/* system clock ticks */