diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-23 23:57:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-23 23:57:47 +0100 |
commit | e9601250110decc8f4323c76be8549acff091966 (patch) | |
tree | 7a2ab72fd7e69e6c5696a790597dfcee2cf04e63 /src/pulsecore/mutex.h | |
parent | db27c6347ebe3316bb5f80518c6cc86eea67779b (diff) |
add support for static mutexes
Diffstat (limited to 'src/pulsecore/mutex.h')
-rw-r--r-- | src/pulsecore/mutex.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pulsecore/mutex.h b/src/pulsecore/mutex.h index 36e1d635..8e0b1f2e 100644 --- a/src/pulsecore/mutex.h +++ b/src/pulsecore/mutex.h @@ -23,6 +23,7 @@ ***/ #include <pulsecore/macro.h> +#include <pulsecore/atomic.h> typedef struct pa_mutex pa_mutex; @@ -45,4 +46,10 @@ void pa_cond_free(pa_cond *c); void pa_cond_signal(pa_cond *c, int broadcast); int pa_cond_wait(pa_cond *c, pa_mutex *m); +typedef struct pa_static_mutex { + pa_atomic_ptr_t ptr; +} pa_static_mutex; + +pa_mutex* pa_static_mutex_get(pa_static_mutex *m, pa_bool_t recursive, pa_bool_t inherit_priority); + #endif |