From 06698504cafb9d3b87674c51bbd49dbbb6a54db0 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 11 Feb 2010 20:03:10 +0100 Subject: playlist thread-safety measures --- threading.h | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'threading.h') 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 -- cgit v1.2.3