summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-09-21 17:48:31 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-09-21 17:48:31 -0700
commita894902293392cdae3a614ae3ff065ca3a7b9f75 (patch)
treefff14fc9ab4d2d8f792252932682511ee11f8775 /libc
parent2e012c0b337809836eba82776cef51bd580b3912 (diff)
downloaduClibc-alpine-a894902293392cdae3a614ae3ff065ca3a7b9f75.tar.bz2
uClibc-alpine-a894902293392cdae3a614ae3ff065ca3a7b9f75.tar.xz
uClibc_mutex.h: define non-thread versions of all the io-mutex macros
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_mutex.h17
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 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__ */