summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/bits/uClibc_mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/bits/uClibc_mutex.h')
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_mutex.h56
1 files changed, 2 insertions, 54 deletions
diff --git a/libc/sysdeps/linux/common/bits/uClibc_mutex.h b/libc/sysdeps/linux/common/bits/uClibc_mutex.h
index e31767787..14aeb9c80 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_mutex.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_mutex.h
@@ -12,7 +12,8 @@
#ifdef __UCLIBC_HAS_THREADS__
-#include <bits/pthreadtypes.h>
+#include <pthread.h>
+#include <bits/uClibc_pthread.h>
#define __UCLIBC_MUTEX_TYPE pthread_mutex_t
@@ -61,53 +62,6 @@
#define __UCLIBC_MUTEX_UNLOCK(M) \
__UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1)
-#ifdef __USE_STDIO_FUTEXES__
-
-#include <bits/stdio-lock.h>
-
-#define __UCLIBC_IO_MUTEX(M) _IO_lock_t M
-#define __UCLIBC_IO_MUTEX_LOCK(M) _IO_lock_lock(M)
-#define __UCLIBC_IO_MUTEX_UNLOCK(M) _IO_lock_unlock(M)
-#define __UCLIBC_IO_MUTEX_TRYLOCK(M) _IO_lock_trylock(M)
-#define __UCLIBC_IO_MUTEX_INIT(M,I) _IO_lock_t M = I
-#define __UCLIBC_IO_MUTEX_EXTERN(M) extern _IO_lock_t M
-
-#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) \
- if (C) { \
- _IO_lock_lock(M); \
- }
-
-#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) \
- if (C) { \
- _IO_lock_unlock(M); \
- }
-
-#define __UCLIBC_IO_MUTEX_AUTO_LOCK(M,A,V) \
- __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,((A=(V))) == 0)
-
-#define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) \
- __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,((A) ==0))
-
-#define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) \
- __UCLIBC_IO_MUTEX_LOCK(M)
-#define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) \
- __UCLIBC_IO_MUTEX_UNLOCK(M)
-#define __UCLIBC_IO_MUTEX_TRYLOCK_CANCEL_UNSAFE(M) \
- __UCLIBC_IO_MUTEX_TRYLOCK(M)
-
-#else
-#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
-#define __UCLIBC_IO_MUTEX_INIT(M,I) __UCLIBC_MUTEX_INIT(M,I)
-#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)
-
-#endif
-
#else
#define __UCLIBC_MUTEX(M) void *__UCLIBC_MUTEX_DUMMY_ ## M
@@ -129,12 +83,6 @@
#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
#endif
-
#endif /* _UCLIBC_MUTEX_H */