![]()  | 
  
    libgpac
    
   Documentation of the core library of GPAC 
   | 
  
Mutual exclusion. More...
 Collaboration diagram for Mutex:Functions | |
| GF_Mutex * | gf_mx_new (const char *name) | 
| mutex constructor   | |
| void | gf_mx_del (GF_Mutex *mx) | 
| mutex denstructor   | |
| u32 | gf_mx_p (GF_Mutex *mx) | 
| mutex locking   | |
| void | gf_mx_v (GF_Mutex *mx) | 
| mutex unlocking   | |
| Bool | gf_mx_try_lock (GF_Mutex *mx) | 
| mutex non-blocking lock   | |
| s32 | gf_mx_get_num_locks (GF_Mutex *mx) | 
| get mutex number of locks   | |
Mutual exclusion.
The mutex object allows ensuring that portions of the code (typically access to variables) cannot be executed by two threads (or a thread and the main process) at the same time.
| GF_Mutex * gf_mx_new | ( | const char * | name | ) | 
mutex constructor
Contructs a new mutex object
| name | log name of the thread if any | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_mx_del | ( | GF_Mutex * | mx | ) | 
mutex denstructor
Destroys a mutex object. This will wait for the mutex to be released if needed.
| mx | the mutex object, may be NULL | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| u32 gf_mx_p | ( | GF_Mutex * | mx | ) | 
mutex locking
Locks the mutex object, making sure that another thread locking this mutex cannot execute until the mutex is unlocked.
| mx | the mutex object, may be NULL | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_mx_v | ( | GF_Mutex * | mx | ) | 
mutex unlocking
Unlocks the mutex object, allowing other threads waiting on this mutex to continue their execution
| mx | the mutex object, may be NULL | 
 Here is the call graph for this function:| Bool gf_mx_try_lock | ( | GF_Mutex * | mx | ) | 
mutex non-blocking lock
Attemps to lock the mutex object without blocking until the object is released.
| mx | the mutex object, may be NULL | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| s32 gf_mx_get_num_locks | ( | GF_Mutex * | mx | ) | 
get mutex number of locks
Returns the number of locks on the mutex if the caller thread is holding the mutex.
| mx | the mutex object, may be NULL | 
 Here is the call graph for this function:
 Here is the caller graph for this function: