diff options
author | Khem Raj <kraj@mvista.com> | 2008-07-09 23:52:41 +0000 |
---|---|---|
committer | Khem Raj <kraj@mvista.com> | 2008-07-09 23:52:41 +0000 |
commit | c776700c71250f0666f5f23ba198f6c3d03974c6 (patch) | |
tree | edf45e8c27e0704a51e22be1f37f06e2e0a3e09e /libc/sysdeps/linux/common/bits/uClibc_mutex.h | |
parent | 8881017aeb43889e5eba0bd29e7bd484b715f56b (diff) | |
download | uClibc-alpine-c776700c71250f0666f5f23ba198f6c3d03974c6.tar.bz2 uClibc-alpine-c776700c71250f0666f5f23ba198f6c3d03974c6.tar.xz |
Fix the builds without STDIO_FUTEXES. Fix msgecv and msgsend to compile on ARM as well.
Diffstat (limited to 'libc/sysdeps/linux/common/bits/uClibc_mutex.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_mutex.h | 56 |
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 */ |