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


cma_lib_queue_enqueue

Inserts an element at the end of an atomic queue.

Syntax

cma_lib_queue_enqueue (queue, element)
 


Argument Data Type Access

queue opaque cma_lib_t_queue read element opaque cma_t_address read


C Binding

void
cma_lib_queue_enqueue (
cma_lib_t_queue *queue,
cma_lib_t_address element);

Arguments

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 is blocked until an element is removed from the queue. When the element is dequeued the calling thread resumes, the new element is inserted, and this routine returns.

Call cma_lib_queue_try_enqueue to insert an element into a queue and return a status code (instead of blocking) if the queue is full.

Exceptions

cma_e_existence
cma_e_use_error



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