
B–61863E–1/06
2. TASK CONTROL FUNCTION
PMC CONTROL SOFTWARE
73
Mailboxes are used for communication between tasks. A mailbox is an
FIFO-based message queue placed between tasks. It consists of a ring
buffer.
The mailbox is an area open to the entire system area. Any task can read
and write from/to the mailbox.
Therefore, at the application design stage, it is necessary to clarify which
task accesses which mailbox.
task B
Mail box
(ring buffer)
cccccccc
Write Read
task A
aaaaaaaa
bbbbbbbb
The mailbox is controlled as follows:
D Although the mailbox holds no data, a task attempts to read data.
↓
The task waits until data is written to the mailbox.
Wait
Read
Write point
task B
cccccccc
aaaaaaaa
bbbbbbbb
Waiting for read
Mailbox
D Although the mailbox is full of data, a task attempts to write data.
↓
The task waits until an entry of the mailbox becomes empty.
Mailbox
dddddddd
Wait
Waiting for write
READ POINT
Write
task A
eeeeeeee
ffffffff
cccccccc
2.6.5
Intertask
Communication
(Mailbox)