From 7270c874630a097227a07891dd50bf8baefc3f07 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 8 Dec 2006 03:19:36 +0000 Subject: finish the pthread locking cleanups. This should get things compiling again though I still need to silence the warnings about _pthread_cleanup_push_defer --- include/libc-internal.h | 2 ++ libc/misc/pthread/Makefile.in | 2 +- libc/sysdeps/linux/common/bits/uClibc_mutex.h | 1 + libc/sysdeps/linux/common/bits/uClibc_pthread.h | 3 +-- libpthread/linuxthreads.old/sysdeps/pthread/pthread.h | 3 --- libpthread/linuxthreads/sysdeps/pthread/pthread.h | 3 --- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/libc-internal.h b/include/libc-internal.h index 80bac2362..2f4f7fae3 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -56,6 +56,8 @@ extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen); # define __pthread_mutex_lock(mutex) ((void)0) # define __pthread_mutex_trylock(mutex) ((void)0) # define __pthread_mutex_unlock(mutex) ((void)0) +# define _pthread_cleanup_push_defer(mutex) ((void)0) +# define _pthread_cleanup_pop_restore(mutex) ((void)0) # endif /* internal access to program name */ diff --git a/libc/misc/pthread/Makefile.in b/libc/misc/pthread/Makefile.in index fc138c91a..a768ac8f9 100644 --- a/libc/misc/pthread/Makefile.in +++ b/libc/misc/pthread/Makefile.in @@ -8,7 +8,7 @@ MISC_PTHREAD_DIR := $(top_srcdir)libc/misc/pthread MISC_PTHREAD_OUT := $(top_builddir)libc/misc/pthread -libc-static-$(UCLIBC_HAS_THREADS) += $(MISC_PTHREAD_OUT)/weaks.o +libc-$(UCLIBC_HAS_THREADS) += $(MISC_PTHREAD_OUT)/weaks.o objclean-y += misc_pthread_objclean diff --git a/libc/sysdeps/linux/common/bits/uClibc_mutex.h b/libc/sysdeps/linux/common/bits/uClibc_mutex.h index 5464c2285..45b4b07df 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_mutex.h +++ b/libc/sysdeps/linux/common/bits/uClibc_mutex.h @@ -13,6 +13,7 @@ #ifdef __UCLIBC_HAS_THREADS__ #include +#include #define __UCLIBC_MUTEX_TYPE pthread_mutex_t diff --git a/libc/sysdeps/linux/common/bits/uClibc_pthread.h b/libc/sysdeps/linux/common/bits/uClibc_pthread.h index a3be2ca35..f247ea673 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_pthread.h +++ b/libc/sysdeps/linux/common/bits/uClibc_pthread.h @@ -28,8 +28,7 @@ #endif extern int __pthread_mutex_init (pthread_mutex_t *__restrict __mutex, - __const pthread_mutexattr_t *__restrict - __mutex_attr) attribute_hidden; + __const pthread_mutexattr_t *__restrict __mutex_attr) attribute_hidden; extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex) attribute_hidden; extern int __pthread_mutex_lock (pthread_mutex_t *__mutex) attribute_hidden; extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex) attribute_hidden; diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h index 0cee6a84f..448636bd9 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h @@ -24,9 +24,6 @@ #include #include #include -#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc) -#include -#endif __BEGIN_DECLS diff --git a/libpthread/linuxthreads/sysdeps/pthread/pthread.h b/libpthread/linuxthreads/sysdeps/pthread/pthread.h index 08843d18d..0fa3be131 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads/sysdeps/pthread/pthread.h @@ -24,9 +24,6 @@ #include #include #include -#if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc ) -#include -#endif __BEGIN_DECLS -- cgit v1.2.3