Table C-12 This table shows the difference in API for message-queue management.
Panel | ||||
---|---|---|---|---|
| ||||
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
INT8U opt,
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
INT32U timeout,
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
INT8U opt,
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Table C-12 Message Queue Management API
...
Panel | ||
---|---|---|
| ||
(1) In µC/OS-III, there is no “accept” API as this feature is built into the |
...
(2) In µC/OS-II, |
...
(3) µC/OS-III returns additional information when a message queue is posted. Specifically, the sender includes the size of the message and takes a snapshot of the current timestamp and stores it in the message. The receiver of the message therefore knows when the message was posted. |
...
(4) In µC/OS-III, |
...
(5) µC/OS-III does not provide query services as they were rarely used |
...
...
µC/OS-II (os_q.c
)
...
. |
...
Note
...
void *
OSQAccept(
OS_EVENT *pevent,
INT8U *perr);
...
(1)
...
OS_EVENT *
OSQCreate(
void **start,
INT16U size);
...
void
OSQCreate(
OS_Q *p_q,
CPU_CHAR *p_name,
OS_MSG_QTY max_qty,
OS_ERR *p_err);
...
(2)
...
OS_EVENT *
OSQDel(
OS_EVENT *pevent,
INT8U opt,
INT8U *perr);
...
OS_OBJ_QTY,
OSQDel(
OS_Q *p_q,
OS_OPT opt,
OS_ERR *p_err);
...
INT8U
OSQFlush(
OS_EVENT *pevent);
...
OS_MSG_QTY
OSQFlush(
OS_Q *p_q,
OS_ERR *p_err);
...
void *
OSQPend(
OS_EVENT *pevent,
INT32U timeout,
INT8U *perr);
...
void *
OSQPend(
OS_Q *p_q,
OS_MSG_SIZE *p_msg_size,
OS_TICK timeout,
OS_OPT opt,
CPU_TS *p_ts,
OS_ERR *p_err);
...