CyberLink for C

cmutex.h File Reference

#include <cybergarage/typedef.h>
#include <pthread.h>

Data Structures

struct  _CgMutex
 The generic wrapper struct for CyberLinkC's mutexes. More...

Typedefs

typedef struct _CgMutex CgMutex
 The generic wrapper struct for CyberLinkC's mutexes.

Functions

CgMutex * cg_mutex_new ()
BOOL cg_mutex_delete (CgMutex *mutex)
BOOL cg_mutex_lock (CgMutex *mutex)
BOOL cg_mutex_unlock (CgMutex *mutex)

Typedef Documentation

typedef struct _CgMutex CgMutex

The generic wrapper struct for CyberLinkC's mutexes.

This wrapper has been created to enable 100% code compatibility for different platforms (Linux, Win32 etc..)


Function Documentation

BOOL cg_mutex_delete ( CgMutex *  mutex)

Destroy a mutex

Parameters:
mutexThe mutex to destroy
BOOL cg_mutex_lock ( CgMutex *  mutex)

Acquire a mutex lock

Parameters:
mutexMutex to lock
CgMutex* cg_mutex_new ( )

Create a new mutex

BOOL cg_mutex_unlock ( CgMutex *  mutex)

Release a locked mutex

Parameters:
mutexMutex to unlock