diff options
| author | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 01:35:14 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 01:35:14 +0000 |
| commit | bf293afeca043b28fd1d07e179106f337aa9ec58 (patch) | |
| tree | cbd15671dfeef397742c9b34a136ac8345d13a54 | |
| parent | b0c9067d7b93d240363167e0778a86eae939eb4d (diff) | |
| download | glibc-bf293afeca043b28fd1d07e179106f337aa9ec58.tar.xz glibc-bf293afeca043b28fd1d07e179106f337aa9ec58.zip | |
Update.
2003-01-02 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/arm/sigaction.c (__sigaction,
sigaction): Protect weak_alias and libc_hidden_weak with
#ifndef LIBC_SIGACTION.
* sysdeps/unix/sysv/linux/ia64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/mips/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction,
sigaction): Likewise. Remove SIGCANCEL handling here.
* sysdeps/unix/sysv/linux/sigaction.c (__sigaction, sigaction):
Likewise.
44 files changed, 601 insertions, 133 deletions
@@ -1,3 +1,25 @@ +2003-01-02 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/arm/sigaction.c (__sigaction, + sigaction): Protect weak_alias and libc_hidden_weak with + #ifndef LIBC_SIGACTION. + * sysdeps/unix/sysv/linux/ia64/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/mips/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/x86_64/sigaction.c (__sigaction, + sigaction): Likewise. + * sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction, + sigaction): Likewise. Remove SIGCANCEL handling here. + * sysdeps/unix/sysv/linux/sigaction.c (__sigaction, sigaction): + Likewise. + 2003-01-02 Art Haas <ahaas@airmail.net> * login/tst-utmp.c: Convert GCC extension initializer syntax to C99. diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index a667e22ede..ad38286577 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,66 @@ 2003-01-02 Ulrich Drepper <drepper@redhat.com> + * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have + cancellation tests. + +2003-01-02 Jakub Jelinek <jakub@redhat.com> + + * internals.h (struct pthread_functions): Rename + ptr_pthread_cond_* fields to ptr___pthread_cond_*. + * pthread.c (pthread_functions): Adjust. + * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and + pthread_cond_*@GLIBC_2.0 compatibility symbols. + * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast, + pthread_cond_destroy, pthread_cond_init, pthread_cond_signal + and pthread_cond_wait. + + * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New + type. + (pthread_cond_t): Add __align member, shorten __padding. + * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize + __padding and __align too. + + * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add + __builtin_expect. + * sysdeps/pthread/sigaction.c: New file. + * sysdeps/unix/sysv/linux/raise.c: New file. + * sysdeps/unix/sysv/linux/sigwait.c: New file. + * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect + weak_extern with #ifndef SHARED. + * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto): + Likewise. + * signals.c (__sigaction): Renamed to... + (__pthread_sigaction): ... this. + (__sigaction): New strong alias, #ifdef SHARED only. + (sigaction): Protect with #ifdef SHARED. + (sigwait): Renamed to... + (__pthread_sigwait): ... this. + (sigwait): New strong alias, #ifdef SHARED only. + (raise): Renamed to... + (__pthread_raise): ... this. + (raise): New strong alias, #ifdef SHARED only. + * internals.h (__pthread_sigaction, __pthread_sigwait, + __pthread_raise): New prototypes. + (struct pthread_functions): Add ptr_pthread_sigaction, + ptr_pthread_sigwait, ptr_pthread_raise. + * pthread.c (pthread_functions): Renamed to... + (__pthread_functions): ... this. No longer static, no longer + SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait + and ptr_pthread_raise. + [SHARED] (ptr_pthread_functions): Change to &__pthread_functions. + * libc-cancellation.c (__pthread_thread_self): Remove weak_extern. + * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED. + * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED. + + * Makefile (tests, tests-static): Add tst-cancel-static. + * tst-cancel-static.c: New test. + +2003-01-02 Jakub Jelinek <jakub@redhat.com> + + * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc. + +2003-01-02 Ulrich Drepper <drepper@redhat.com> + * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding. * condvar.c: Add symbol versioning. The compatibility versions are the same as the change in the interface does not effect this diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile index 9a6745fe17..b9edd40031 100644 --- a/linuxthreads/Makefile +++ b/linuxthreads/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -54,6 +54,8 @@ libpthread-shared-only-routines = pt-allocrtsig libpthread-nonshared = pthread_atfork +CFLAGS-pthread_atfork.c = -DNOT_IN_libc + nodelete-yes = -Wl,--enable-new-dtags,-z,nodelete initfirst-yes = -Wl,--enable-new-dtags,-z,initfirst LDFLAGS-pthread.so = $(nodelete-$(have-z-nodelete)) \ @@ -92,8 +94,8 @@ test-srcs = tst-signal tests-reverse += tst-cancel5 ifeq ($(build-static),yes) -tests += tststatic tst-static-locale -tests-static += tststatic tst-static-locale +tests += tststatic tst-static-locale tst-cancel-static +tests-static += tststatic tst-static-locale tst-cancel-static endif ifeq (yes,$(build-shared)) diff --git a/linuxthreads/Versions b/linuxthreads/Versions index 8dd40eec28..0facfbc4c7 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -16,6 +16,12 @@ libc { GLIBC_2.1 { pthread_attr_init; } + GLIBC_2.3.2 { + # Changed pthread_cond_t. + pthread_cond_init; pthread_cond_destroy; + pthread_cond_wait; pthread_cond_signal; + pthread_cond_broadcast; + } GLIBC_PRIVATE { # Internal libc interface to libpthread __libc_dl_error_tsd; diff --git a/linuxthreads/forward.c b/linuxthreads/forward.c index b8f54f4f51..6cc2f99aac 100644 --- a/linuxthreads/forward.c +++ b/linuxthreads/forward.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -84,18 +84,49 @@ FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) -FORWARD (pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) - -FORWARD (pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) +FORWARD (__pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_broadcast, __pthread_cond_broadcast_2_0) +compat_symbol (libc, __pthread_cond_broadcast_2_0, pthread_cond_broadcast, + GLIBC_2_0); +#endif +versioned_symbol (libc, __pthread_cond_broadcast, pthread_cond_broadcast, + GLIBC_2_3_2); + +FORWARD (__pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_destroy, __pthread_cond_destroy_2_0) +compat_symbol (libc, __pthread_cond_destroy_2_0, pthread_cond_destroy, + GLIBC_2_0); +#endif +versioned_symbol (libc, __pthread_cond_destroy, pthread_cond_destroy, + GLIBC_2_3_2); -FORWARD (pthread_cond_init, +FORWARD (__pthread_cond_init, (pthread_cond_t *cond, const pthread_condattr_t *cond_attr), (cond, cond_attr), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_init, __pthread_cond_init_2_0) +compat_symbol (libc, __pthread_cond_init_2_0, pthread_cond_init, GLIBC_2_0); +#endif +versioned_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_3_2); -FORWARD (pthread_cond_signal, (pthread_cond_t *cond), (cond), 0) +FORWARD (__pthread_cond_signal, (pthread_cond_t *cond), (cond), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_signal, __pthread_cond_signal_2_0) +compat_symbol (libc, __pthread_cond_signal_2_0, pthread_cond_signal, + GLIBC_2_0); +#endif +versioned_symbol (libc, __pthread_cond_signal, pthread_cond_signal, + GLIBC_2_3_2); -FORWARD (pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), +FORWARD (__pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), (cond, mutex), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_wait, __pthread_cond_wait_2_0) +compat_symbol (libc, __pthread_cond_wait_2_0, pthread_cond_wait, GLIBC_2_0); +#endif +versioned_symbol (libc, __pthread_cond_wait, pthread_cond_wait, GLIBC_2_3_2); FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2), diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index 872bc5c047..6241e9397e 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -452,6 +452,10 @@ extern void __pthread_sighandler(int signo, SIGCONTEXT ctx); extern void __pthread_sighandler_rt(int signo, struct siginfo *si, struct ucontext *uc); extern void __pthread_null_sighandler(int sig); +extern int __pthread_sigaction (int sig, const struct sigaction *act, + struct sigaction *oact); +extern int __pthread_sigwait (const sigset_t *set, int *sig); +extern int __pthread_raise (int sig); /* Cancellation. */ extern int __pthread_enable_asynccancel (void) attribute_hidden; @@ -505,11 +509,12 @@ struct pthread_functions int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); - int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); - int (*ptr_pthread_cond_destroy) (pthread_cond_t *); - int (*ptr_pthread_cond_init) (pthread_cond_t *, const pthread_condattr_t *); - int (*ptr_pthread_cond_signal) (pthread_cond_t *); - int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); + int (*ptr___pthread_cond_broadcast) (pthread_cond_t *); + int (*ptr___pthread_cond_destroy) (pthread_cond_t *); + int (*ptr___pthread_cond_init) (pthread_cond_t *, + const pthread_condattr_t *); + int (*ptr___pthread_cond_signal) (pthread_cond_t *); + int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); int (*ptr_pthread_equal) (pthread_t, pthread_t); void (*ptr___pthread_exit) (void *); int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *); @@ -528,10 +533,14 @@ struct pthread_functions void (*ptr_pthread_cleanup_upto) (__jmp_buf target, char *targetframe); pthread_descr (*ptr_pthread_thread_self) (void); - int (*ptr_pthread_internal_tsd_set) (int key, const void * pointer); + int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer); void * (*ptr_pthread_internal_tsd_get) (int key); void ** __attribute__ ((__const__)) (*ptr_pthread_internal_tsd_address) (int key); + int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act, + struct sigaction *oact); + int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig); + int (*ptr_pthread_raise) (int sig); }; /* Variable in libc.so. */ diff --git a/linuxthreads/libc-cancellation.c b/linuxthreads/libc-cancellation.c index 18feddbf3a..b301d9174c 100644 --- a/linuxthreads/libc-cancellation.c +++ b/linuxthreads/libc-cancellation.c @@ -29,7 +29,6 @@ # ifndef SHARED weak_extern (__pthread_do_exit) -weak_extern (__pthread_thread_self) # endif int __libc_multiple_threads attribute_hidden; diff --git a/linuxthreads/ptfork.c b/linuxthreads/ptfork.c index 195ffcd1b0..9cdbb54361 100644 --- a/linuxthreads/ptfork.c +++ b/linuxthreads/ptfork.c @@ -78,6 +78,7 @@ pid_t __pthread_fork (struct fork_block *b) return pid; } +#ifdef SHARED pid_t __fork (void) { return __libc_fork (); @@ -89,3 +90,4 @@ pid_t __vfork(void) return __libc_fork (); } weak_alias (__vfork, vfork); +#endif diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index 444c0a0ed2..432336258c 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -230,8 +230,7 @@ extern void *__dso_handle __attribute__ ((weak)); extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign); #endif -#ifdef SHARED -static struct pthread_functions pthread_functions = +struct pthread_functions __pthread_functions = { #if !(USE_TLS && HAVE___THREAD) .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set, @@ -256,11 +255,11 @@ static struct pthread_functions pthread_functions = .ptr_pthread_attr_setscope = __pthread_attr_setscope, .ptr_pthread_condattr_destroy = __pthre |
