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


cma_lib_queue_create

Creates an atomic queue.

Syntax

cma_lib_queue_create (new_queue, attr )
 


Argument Data Type Access

new_queue opaque cma_lib_t_queue write attr opaque cma_lib_t_attr read


C Binding

void
cma_lib_queue_create (
cma_lib_t_queue *new_queue,
cma_lib_t_attr *attr);

Arguments

new_queue
Variable that receives the handle of the atomic queue created.
attr
Library attributes object used when creating the queue.

Description

This routine creates an atomic queue. Unlike mutexes and condition variables, an atomic queue implements interthread communication that is not explicitly dependent on synchronization. A queue can communicate information among threads or within a single thread (for example, between an interrupt routine and the normal thread code).

The primary characteristic of an atomic queue is that any operation on the queue is guaranteed to complete before any other operation on that same queue can begin.

The created queue is not affected by termination of the thread that created it. It remains valid until explicitly deleted by cma_lib_ queue_delete.

Exceptions

cma_e_existence
cma_e_use_error



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