QUE_insert
2-346
C Interface
Syntax
QUE_insert(qelem, elem);
Parameters
Ptr
qelem;
/* element already in queue */
Ptr
elem;
/* element to be inserted in queue */
Return Value
Void
Description
QUE_insert inserts elem in the queue in front of qelem.
The qelem parameter is a pointer to an existing element of the QUE. The
elem parameter is a pointer to an element to be placed in the QUE. Such
elements have a structure defined similarly to that in the example in the
QUE Module topic. The first field in the structure must be of type
QUE_Elem and is used as an internal pointer.
Note:
If the queue is shared by multiple tasks, or tasks and SWIs or HWIs,
QUE_insert should be used in conjunction with some mutual exclusion
mechanism (for example, SEM_pend/SEM_post, TSK_disable/
TSK_enable).
See Also
QUE_head
QUE_next
QUE_prev
QUE_remove
QUE_insert
Insert in middle of queue (non-atomically)