QUE_put
2-350
C Interface
Syntax
QUE_put(queue, elem);
Parameters
QUE_Handle queue;
/* queue object handle */
Void
*elem;
/* pointer to new queue element */
Return Value
Void
Description
QUE_put puts elem at the end of queue.
The elem parameter is a pointer to an element to be placed at the end of
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.
Since QUE_put manipulates queues with interrupts disabled, queues can
be shared by multiple tasks, or by tasks and SWIs or HWIs.
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_put
Put element at end of queue (atomically)