- 47 -
4.1.7
Synchronization and Communication Function (Data Queue)
The data queue is a mechanism to perform data communication between tasks. In Figure 4.14, for example, task A can
transmit data to the data queue and task B can receive the transmitted data from the data queue.
Da
ta
Da
ta
Da
ta
Data
Data
Task B
Task A
Figure 4.14 Data queue
Data in width of 32 bits can be transmitted to this data queue.
The data queue has the function to accumulate data. The accumulated data is retrieved in order of FIFO
. However, the
number of data that can be accumulated in the data queue is limited. If data is transmitted to the data queue that is full of
data, the service call issuing task goes to a data transmission wait state.
There are following data queue service calls that are provided by the MR100 kernel.
•
Send to Data Queue(snd_dtq, tsnd_dtq)
The data is transmitted to the data queue. If the data queue is full of data, the task goes to a data transmission wait
state.
•
Send to Data Queue (psnd_dtq, ipsnd_dtq)
The data is transmitted to the data queue. If the data queue is full of data, the task returns error code without going
to a data transmission wait state.
•
Forced Send to Data Queue (fsnd_dtq, ifsnd_dtq)
The data is transmitted to the data queue. If the data queue is full of data, the data at the top of the data queue or
the oldest data is removed, and the transmitted data is stored at the tail of the data queue.
•
Receive from Data Queue (rcv_dtq, trcv_dtq)
The data is retrieved from the data queue. If the data queue has no data in it, the task is kept waiting until data is
transmitted to the data queue.
•
Receive from Data Queue (prcv_dtq,iprcv_dtq)
The data is received from the data queue. If the data queue has no data in it, the task returns error code without
going to a data reception wait state.
•
Reference Data Queue Status (ref_dtq,iref_dtq)
Checks to see if there are any tasks waiting for data to be entered in the target data queue and refers to the number
of the data in the data queue.
22
First In First Out
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...