[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


cma_lib_queue_try_enqueue

Inserts an element at the end of an atomic queue.

Syntax

status = cma_lib_queue_try_enqueue (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 (
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. 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.

Call cma_lib_queue_enqueue if you want to insert an element into a queue but cause the calling thread to block if the queue is full. Call cma_lib_queue_try_enqueue_int if you want to insert an element into a queue from interrupt level.

Exceptions

cma_e_existence
cma_e_use_error



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]