User`s guide
Mailboxes
4-62
Conversely, MBX_post is used to post a message to the mailbox as shown in
Example 4-15. If no message slots are available (that is, the mailbox is full),
MBX_post blocks. In this case, the timeout parameter allows the task to wait
until a timeout, to wait indefinitely, or to not wait at all.
Example 4-15. Posting a Message to a Mailbox
4.7.1 MBX Example
Example 4-16 provides sample code showing two types of tasks created with
the Configuration Tool: 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-16 is shown in Figure 4-17.
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 */










