diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-02-11 20:03:10 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-02-11 20:03:10 +0100 |
commit | 06698504cafb9d3b87674c51bbd49dbbb6a54db0 (patch) | |
tree | 24934f001c2951e2151411693bec178717686a0d /threading.h | |
parent | 70fc72b7d985394517d3d84c3c160c3476adaf32 (diff) |
playlist thread-safety measures
Diffstat (limited to 'threading.h')
-rw-r--r-- | threading.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/threading.h b/threading.h index 66b91571..f8767360 100644 --- a/threading.h +++ b/threading.h @@ -26,16 +26,35 @@ thread_start (void (*fn)(void *ctx), void *ctx); int thread_join (intptr_t tid); -uintptr_t mutex_create (void); -void mutex_free (uintptr_t mtx); -int mutex_lock (uintptr_t mtx); -int mutex_unlock (uintptr_t mtx); - -uintptr_t cond_create (void); -void cond_free (uintptr_t cond); -int cond_wait (uintptr_t cond, uintptr_t mutex); -int cond_signal (uintptr_t cond); -int cond_broadcast (uintptr_t cond); +uintptr_t +mutex_create (void); + +uintptr_t +mutex_create_recursive (void); + +void +mutex_free (uintptr_t mtx); + +int +mutex_lock (uintptr_t mtx); + +int +mutex_unlock (uintptr_t mtx); + +uintptr_t +cond_create (void); + +void +cond_free (uintptr_t cond); + +int +cond_wait (uintptr_t cond, uintptr_t mutex); + +int +cond_signal (uintptr_t cond); + +int +cond_broadcast (uintptr_t cond); #endif |