Inserts an element at the end of an atomic queue from interrupt
level.
Syntax
status = cma_lib_queue_try_enqueue_int (queue, element)
Argument Data Type Access
status Boolean cma_t_boolean write
queue opaque cma_lib_t_queue read
element opaque cma_t_address read
C Binding
cma_t_boolean
cma_lib_queue_try_enqueue_int (
cma_lib_t_queue *queue,
cma_lib_t_address element);
Arguments
- status
- Boolean value that specifies whether the element was enqueued.
- queue
- Handle of the queue to which the element is inserted.
- element
- Address of the queue element inserted.
Description
This routine inserts an element at the end of a queue from
interrupt level. If the queue is full, the calling thread does not
wait for an element to be removed. Instead, the routine returns with
the status cma_c_false. If the queue is not full, the element is
inserted at the end of the queue and the routine returns with the
status cma_c_true.
- Note
- This routine allows you to add
elements to a queue from a software interrupt handler. Do not call
this routine from noninterrupt code. If you want to add elements
to a queue from the normal noninterrupt level without blocking, use
cma_lib_queue_try_enqueue.
Exceptions
cma_e_existence
cma_e_use_error