QUE_enqueue
Application Program Interface
2-343
C Interface
Syntax
QUE_enqueue(queue, elem);
Parameters
QUE_Handle queue;
/* queue object handle */
Ptr
elem;
/* pointer to queue element */
Return Value
Void
Description
QUE_enqueue inserts elem at the end of queue.
The elem parameter must be 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:
Use QUE_put instead of QUE_enqueue if multiple threads share a
queue. QUE_put is never interrupted; QUE_enqueue performs the
same action but runs non-atomically. You can use QUE_enqueue if
you disable interrupts or use a synchronization mechanism such as
LCK or SEM to protect the queue.
QUE_enqueue is somewhat faster than QUE_put, but you should not
use it unless you know your QUE operation cannot be preempted by
another thread that operates on the same queue.
See Also
QUE_enqueue
Insert at end of queue (non-atomically)