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


cma_mutex_create

Creates a mutex.

Syntax

cma_mutex_create(
                  new_mutex,
                  attr);
 


Argument Data Type Access

new_mutex opaque cma_t_mutex write attr opaque cma_t_attr read


C Binding

#include 

void cma_mutex_create ( cma_t_mutex *new_mutex, cma_t_attr *attr);

Arguments

new_mutex
Receives a handle for the mutex.
attr
Handle of the attributes object that defines the characteristics of the mutex created. If you specify cma_c_null, default attributes are used.

Description

This routine creates a mutex. A mutex is a synchronization object that allows multiple threads to serialize their access to shared data.

The mutex is created and initialized to the unlocked state.

If the thread that called this routine terminates, the created mutex is not automatically deallocated because it is considered to be shared among multiple threads.

Exceptions

cma_e_existence
cma_e_use_error



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