Semaphores, Mutexes and Conditions.
More...
Go to the source code of this file.
Semaphores, Mutexes and Conditions.
- Author
- Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om
- Copyright
- MIT License
Implementation (based on GMutex) of a locking mechanism based on mutexes and conditions.
◆ imquic_condition_broadcast
#define imquic_condition_broadcast |
( |
| a | ) |
|
Value:
imquic condition broadcast
◆ imquic_condition_destroy
#define imquic_condition_destroy |
( |
| a | ) |
|
Value:
imquic condition destruction
◆ imquic_condition_init
#define imquic_condition_init |
( |
| a | ) |
|
Value:
imquic condition initialization
◆ imquic_condition_signal
#define imquic_condition_signal |
( |
| a | ) |
|
Value:
imquic condition signal
◆ imquic_condition_wait
#define imquic_condition_wait |
( |
| a, |
|
|
| b ) |
Value:
imquic condition wait
◆ imquic_condition_wait_until
#define imquic_condition_wait_until |
( |
| a, |
|
|
| b, |
|
|
| c ) |
Value:g_cond_wait_until(a, b, c);
imquic condition wait until
◆ imquic_mutex_destroy
#define imquic_mutex_destroy |
( |
| a | ) |
|
Value:
imquic mutex destruction
◆ imquic_mutex_init
#define imquic_mutex_init |
( |
| a | ) |
|
Value:
imquic mutex initialization
◆ IMQUIC_MUTEX_INITIALIZER
#define IMQUIC_MUTEX_INITIALIZER {0} |
imquic static mutex initializer
◆ imquic_mutex_lock
#define imquic_mutex_lock |
( |
| a | ) |
|
Value:
#define imquic_mutex_lock_debug(a)
imquic mutex lock with debug (prints the line that locked a mutex)
Definition mutex.h:28
gboolean imquic_lock_debug
Definition imquic.c:30
#define imquic_mutex_lock_nodebug(a)
imquic mutex lock without debug
Definition mutex.h:26
imquic mutex lock wrapper (selective locking debug)
◆ imquic_mutex_lock_debug
#define imquic_mutex_lock_debug |
( |
| a | ) |
|
Value:{
IMQUIC_PRINT(
"[%s:%s:%d:lock] %p\n", __FILE__, __FUNCTION__, __LINE__, a); g_mutex_lock(a); }
#define IMQUIC_PRINT
Simple wrapper to g_print/printf.
Definition debug.h:88
imquic mutex lock with debug (prints the line that locked a mutex)
◆ imquic_mutex_lock_nodebug
#define imquic_mutex_lock_nodebug |
( |
| a | ) |
|
Value:
imquic mutex lock without debug
◆ imquic_mutex_trylock
#define imquic_mutex_trylock |
( |
| a | ) |
|
Value:
#define imquic_mutex_trylock_debug(a)
imquic mutex try lock with debug (prints the line that tried to lock a mutex)
Definition mutex.h:34
#define imquic_mutex_trylock_nodebug(a)
imquic mutex try lock without debug
Definition mutex.h:32
imquic mutex try lock wrapper (selective locking debug)
◆ imquic_mutex_trylock_debug
#define imquic_mutex_trylock_debug |
( |
| a | ) |
|
Value:{
IMQUIC_PRINT(
"[%s:%s:%d:trylock] %p\n", __FILE__, __FUNCTION__, __LINE__, a); ret = g_mutex_trylock(a); }
imquic mutex try lock with debug (prints the line that tried to lock a mutex)
◆ imquic_mutex_trylock_nodebug
#define imquic_mutex_trylock_nodebug |
( |
| a | ) |
|
Value:{ ret = g_mutex_trylock(a); }
imquic mutex try lock without debug
◆ imquic_mutex_unlock
#define imquic_mutex_unlock |
( |
| a | ) |
|
Value:
#define imquic_mutex_unlock_nodebug(a)
imquic mutex unlock without debug
Definition mutex.h:38
#define imquic_mutex_unlock_debug(a)
imquic mutex unlock with debug (prints the line that unlocked a mutex)
Definition mutex.h:40
imquic mutex unlock wrapper (selective locking debug)
◆ imquic_mutex_unlock_debug
#define imquic_mutex_unlock_debug |
( |
| a | ) |
|
Value:{
IMQUIC_PRINT(
"[%s:%s:%d:unlock] %p\n", __FILE__, __FUNCTION__, __LINE__, a); g_mutex_unlock(a); }
imquic mutex unlock with debug (prints the line that unlocked a mutex)
◆ imquic_mutex_unlock_nodebug
#define imquic_mutex_unlock_nodebug |
( |
| a | ) |
|
Value:
imquic mutex unlock without debug
◆ imquic_condition
imquic condition implementation
◆ imquic_mutex
imquic mutex implementation
◆ imquic_lock_debug
gboolean imquic_lock_debug |
|
extern |