Generic Lightweight Thread (GLT) Library  2.5
A common API for Lightweight Thread solutions
 All Functions Variables Groups Pages
Functions
Mutex functions

Functions

void glt_mutex_create (GLT_mutex *mutex)
 Creates a mutex. More...
 
void glt_mutex_lock (GLT_mutex mutex)
 Locks a mutex. More...
 
void glt_mutex_unlock (GLT_mutex mutex)
 Unlocks a mutex. More...
 
void glt_mutex_free (GLT_mutex *mutex)
 Destroys a mutex. More...
 
void glt_mutex_trylock (GLT_bool *locked, GLT_mutex mutex)
 Tries to lock a mutex. More...
 

Detailed Description

These functions manage the GLT mutexes for the ULTs.

Function Documentation

void glt_mutex_create ( GLT_mutex mutex)

Creates a mutex.

glt_mutex_create() creates a mutex for ULTs.

Parameters
[in,out]mutexHande to newly created GLT_mutex
void glt_mutex_free ( GLT_mutex mutex)

Destroys a mutex.

glt_mutex_free() destroys a mutex for ULTs.

Parameters
[in]mutexHandle to the target GLT_mutex.
void glt_mutex_lock ( GLT_mutex  mutex)

Locks a mutex.

glt_mutex_lock() locks (if possible) a mutex.

Parameters
[in]mutexHandle to the target GLT_mutex.
void glt_mutex_trylock ( GLT_bool locked,
GLT_mutex  mutex 
)

Tries to lock a mutex.

glt_mutex_trylock() tries to lock a mutex.

Parameters
[in]mutexHandle to the target GLT_mutex.
[out]lockedGLT_bool with the value 1 if the mutex has been locked or 0 if it was not possible.
void glt_mutex_unlock ( GLT_mutex  mutex)

Unlocks a mutex.

glt_mutex_unlock() unlocks a mutex.

Parameters
[in]mutexHandle to the target GLT_mutex.