From a894902293392cdae3a614ae3ff065ca3a7b9f75 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Mon, 21 Sep 2009 17:48:31 -0700 Subject: uClibc_mutex.h: define non-thread versions of all the io-mutex macros Signed-off-by: Austin Foxley --- libc/sysdeps/linux/common/bits/uClibc_mutex.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/common/bits/uClibc_mutex.h b/libc/sysdeps/linux/common/bits/uClibc_mutex.h index 36e87ff82..c6094c3d2 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_mutex.h +++ b/libc/sysdeps/linux/common/bits/uClibc_mutex.h @@ -131,11 +131,18 @@ #define __UCLIBC_MUTEX_LOCK(M) ((void)0) #define __UCLIBC_MUTEX_UNLOCK(M) ((void)0) -#define __UCLIBC_IO_MUTEX_LOCK(M) ((void)0) -#define __UCLIBC_IO_MUTEX_UNLOCK(M) ((void)0) -#define __UCLIBC_IO_MUTEX_TRYLOCK(M) ((void)0) -#define __UCLIBC_IO_MUTEX_INIT(M,I) extern void *__UCLIBC_MUTEX_DUMMY_ ## M -#define __UCLIBC_IO_MUTEX_EXTERN(M) extern void *__UCLIBC_MUTEX_DUMMY_ ## M +#define __UCLIBC_IO_MUTEX(M) __UCLIBC_MUTEX(M) +#define __UCLIBC_IO_MUTEX_LOCK(M) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1) +#define __UCLIBC_IO_MUTEX_UNLOCK(M) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1) +#define __UCLIBC_IO_MUTEX_TRYLOCK(M) __UCLIBC_MUTEX_TRYLOCK_CANCEL_UNSAFE(M) +#define __UCLIBC_IO_MUTEX_INIT(M) __UCLIBC_MUTEX_INIT(M, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) +#define __UCLIBC_IO_MUTEX_EXTERN(M) __UCLIBC_MUTEX_EXTERN(M) +#define __UCLIBC_IO_MUTEX_AUTO_LOCK(M,A,V) __UCLIBC_MUTEX_AUTO_LOCK(M,A,V) +#define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) __UCLIBC_MUTEX_AUTO_UNLOCK(M,A) +#define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(M) +#define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(M) +#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1) +#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1) #endif /* of __UCLIBC_HAS_THREADS__ */ -- cgit v1.2.3