[git commit nptl] uClibc_mutex.h: define non-thread versions of all the io-mutex macros
Austin Foxley
austinf at cetoncorp.com
Mon Sep 21 16:16:52 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=a894902293392cdae3a614ae3ff065ca3a7b9f75
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
libc/sysdeps/linux/common/bits/uClibc_mutex.h | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/libc/sysdeps/linux/common/bits/uClibc_mutex.h b/libc/sysdeps/linux/common/bits/uClibc_mutex.h
index 36e87ff..c6094c3 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__ */
--
1.6.3.3
More information about the uClibc-cvs
mailing list