diff options
Diffstat (limited to 'libpthread/nptl/sysdeps/pthread')
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/Makefile.in | 20 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/bits/libc-lock.h | 7 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h | 1 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/pthread.h | 5 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/sigaction.c | 7 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/unwind-resume.c | 5 |
6 files changed, 36 insertions, 9 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index a0ed8c00c..db3cebd4d 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -17,15 +17,25 @@ libpthread_CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c \ pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \ pthread_rwlock_wrlock.c pthread_sigmask.c \ pthread_spin_destroy.c pthread_spin_init.c \ - pthread_spin_unlock.c pt-sigaction.c pt-sigfillset.c \ - pt-sigprocmask.c unwind-forcedunwind.c pt-longjmp.c + pthread_spin_unlock.c pt-sigfillset.c \ + unwind-forcedunwind.c pt-longjmp.c ifeq ($(TARGET_ARCH),i386) libpthread_CSRC += pthread_once.c endif + ifeq ($(TARGET_ARCH),sh) -libpthread_CSRC += pthread_once.c +SH_PTHREAD_EXCLUDE_LIST = pthread_spin_unlock.c pthread_spin_init.c \ + pthread_rwlock_wrlock.c pthread_rwlock_rdlock.c \ + pthread_rwlock_unlock.c pt-longjmp.c \ + pthread_barrier_wait.c pthread_cond_broadcast.c \ + pthread_cond_signal.c \ + pthread_rwlock_timedrdlock.c \ + pthread_rwlock_timedwrlock.c + +libpthread_CSRC := $(filter-out $(SH_PTHREAD_EXCLUDE_LIST),$(libpthread_CSRC)) endif + ifeq ($(TARGET_ARCH),x86_64) libpthread_CSRC += pthread_once.c endif @@ -74,6 +84,10 @@ pthread_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC)) libpthread-a-y += $(pthread_OBJ) libpthread-so-y += $(pthread_OBJ:.o=.oS) +libpthread-so-y += $(pthread_OUT)/pt-sigaction.oS $(pthread_OUT)/pt-sigprocmask.oS + +CFLAGS-sigaction.c = -I$(top_srcdir)libc/signal +libc-y += $(pthread_OUT)/sigaction.o librt-a-y += $(pthread_OUT)/librt-cancellation.o librt-so-y += $(pthread_OUT)/librt-cancellation.oS \ diff --git a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h index d043a0d2e..fb085f5be 100644 --- a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h +++ b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h @@ -409,6 +409,9 @@ extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer /* Normal cleanup handling, based on C cleanup attribute. */ extern __inline void +__libc_cleanup_routine (struct __pthread_cleanup_frame *f); + +extern __inline void __libc_cleanup_routine (struct __pthread_cleanup_frame *f) { if (f->__do_it) @@ -528,10 +531,11 @@ weak_extern (__pthread_key_create) weak_extern (__pthread_setspecific) weak_extern (__pthread_getspecific) weak_extern (__pthread_once) -weak_extern (__pthread_initialize) weak_extern (__pthread_atfork) +#ifdef SHARED weak_extern (_pthread_cleanup_push_defer) weak_extern (_pthread_cleanup_pop_restore) +#endif weak_extern (pthread_setcancelstate) # else # pragma weak __pthread_mutex_init @@ -552,7 +556,6 @@ weak_extern (pthread_setcancelstate) # pragma weak __pthread_setspecific # pragma weak __pthread_getspecific # pragma weak __pthread_once -# pragma weak __pthread_initialize # pragma weak __pthread_atfork # pragma weak _pthread_cleanup_push_defer # pragma weak _pthread_cleanup_pop_restore diff --git a/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h b/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h index 0caf40d7b..cd64bc37e 100644 --- a/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h +++ b/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h @@ -20,6 +20,7 @@ #ifndef _BITS_STDIO_LOCK_H #define _BITS_STDIO_LOCK_H 1 +#include <bits/libc-lock.h> #include <lowlevellock.h> diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h index 9090b30d9..bb322af8f 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread.h +++ b/libpthread/nptl/sysdeps/pthread/pthread.h @@ -26,7 +26,7 @@ #define __need_sigset_t #include <signal.h> #include <bits/pthreadtypes.h> -#include <setjmp.h> +#include <bits/setjmp.h> #include <bits/wordsize.h> #if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc ) #include <bits/uClibc_pthread.h> @@ -536,6 +536,9 @@ class __pthread_cleanup_class needed or fall back on the copy which must exist somewhere else. */ extern __inline void +__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame); + +extern __inline void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) { if (__frame->__do_it) diff --git a/libpthread/nptl/sysdeps/pthread/sigaction.c b/libpthread/nptl/sysdeps/pthread/sigaction.c index 17443654d..54b5d2de4 100644 --- a/libpthread/nptl/sysdeps/pthread/sigaction.c +++ b/libpthread/nptl/sysdeps/pthread/sigaction.c @@ -31,6 +31,9 @@ # include <sigaction.c> int +sigaction (int sig, const struct sigaction *act, struct sigaction *oact); + +int __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) { if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0)) @@ -41,9 +44,9 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) return __libc_sigaction (sig, act, oact); } -libc_hidden_weak (__sigaction) +libc_hidden_proto(sigaction) weak_alias (__sigaction, sigaction) - +libc_hidden_weak(sigaction) #else # include_next <sigaction.c> diff --git a/libpthread/nptl/sysdeps/pthread/unwind-resume.c b/libpthread/nptl/sysdeps/pthread/unwind-resume.c index 594296723..018d2fd2f 100644 --- a/libpthread/nptl/sysdeps/pthread/unwind-resume.c +++ b/libpthread/nptl/sysdeps/pthread/unwind-resume.c @@ -27,13 +27,16 @@ static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); +extern +void abort(void); + static void init (void) { void *resume = NULL; void *personality = NULL; void *handle; - + resume = personality = NULL; /* make gcc silent */ handle = dlopen ("libgcc_s.so.1", (RTLD_LOCAL | RTLD_LAZY)); if (handle == NULL |