aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-07 00:52:01 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-07 00:52:01 +0000
commitc0f53cdd08913ef09f9bb66fb1b14cd88598cff9 (patch)
tree0f2fa11411e0d33f560675100b68683a47987d57 /linuxthreads
parent353aebf582de8dc948b93b642528bea4014b1d8c (diff)
downloadglibc-c0f53cdd08913ef09f9bb66fb1b14cd88598cff9.zip
glibc-c0f53cdd08913ef09f9bb66fb1b14cd88598cff9.tar.gz
glibc-c0f53cdd08913ef09f9bb66fb1b14cd88598cff9.tar.bz2
Update.
2000-07-06 Ulrich Drepper <drepper@redhat.com> * include/signal.h: Declare __libc_sigaction. * sysdeps/unix/sysv/linux/Versions: Export __libc_sigaction. * sysdeps/unix/sysv/linux/sigaction.c: Add __libc_sigaction alias. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise. * configure.in: Fix CLAGS-memprofstat.c definition after 2000-06-19 change. Patch by Bradford W. Johnson <bradford@math.umn.edu>. 2000-07-06 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Pass 0 instead of NULL to elf_machine_fixup_plt t argument. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c (__mmap64): Add cast. 2000-07-06 Andreas Jaeger <aj@suse.de> * crypt/Makefile (LDLIBS-cert): Removed. (LDLIBS-md5c-test): Removed. ($(objpfx)cert): Renamed from cert.out to fix dependencies. ($(objpfx)md5c-test): Likewise for md5c-test.out.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/Versions3
-rw-r--r--linuxthreads/pthread.c12
-rw-r--r--linuxthreads/signals.c5
-rw-r--r--linuxthreads/spinlock.h2
5 files changed, 18 insertions, 9 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index d825934..9af0269 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,10 @@
2000-07-06 Ulrich Drepper <drepper@redhat.com>
+ * Version: Export __sigaction.
+ * signals.c: Define __sigaction alias. Use __libc_sigaction instead
+ of __sigaction.
+ * pthread.c: Use __libc_sigaction instead of __sigaction.
+
* condvar.c: Implement pthread_condattr_getpshared and
pthread_condattr_setpshared.
* mutex.c: Implement pthread_mutexattr_getpshared and
diff --git a/linuxthreads/Versions b/linuxthreads/Versions
index 94a18e5..c52d88f 100644
--- a/linuxthreads/Versions
+++ b/linuxthreads/Versions
@@ -85,6 +85,9 @@ libpthread {
# The error functions.
__errno_location; __h_errno_location;
+
+ # Must be preemptible
+ __sigaction;
}
GLIBC_2.1 {
# Functions with changed interface.
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index a3f829f..2700a29 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -379,15 +379,15 @@ static void pthread_initialize(void)
sa.sa_handler = pthread_handle_sigrestart;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
- __sigaction(__pthread_sig_restart, &sa, NULL);
+ __libc_sigaction(__pthread_sig_restart, &sa, NULL);
sa.sa_handler = pthread_handle_sigcancel;
// sa.sa_flags = 0;
- __sigaction(__pthread_sig_cancel, &sa, NULL);
+ __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
if (__pthread_sig_debug > 0) {
sa.sa_handler = pthread_handle_sigdebug;
sigemptyset(&sa.sa_mask);
// sa.sa_flags = 0;
- __sigaction(__pthread_sig_debug, &sa, NULL);
+ __libc_sigaction(__pthread_sig_debug, &sa, NULL);
}
/* Initially, block __pthread_sig_restart. Will be unblocked on demand. */
sigemptyset(&mask);
@@ -768,10 +768,10 @@ void __pthread_kill_other_threads_np(void)
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
- __sigaction(__pthread_sig_restart, &sa, NULL);
- __sigaction(__pthread_sig_cancel, &sa, NULL);
+ __libc_sigaction(__pthread_sig_restart, &sa, NULL);
+ __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
if (__pthread_sig_debug > 0)
- __sigaction(__pthread_sig_debug, &sa, NULL);
+ __libc_sigaction(__pthread_sig_debug, &sa, NULL);
}
weak_alias (__pthread_kill_other_threads_np, pthread_kill_other_threads_np)
diff --git a/linuxthreads/signals.c b/linuxthreads/signals.c
index 452d860..be9e5aa 100644
--- a/linuxthreads/signals.c
+++ b/linuxthreads/signals.c
@@ -131,7 +131,7 @@ static void pthread_sighandler_rt(int signo, struct siginfo *si,
/* The wrapper around sigaction. Install our own signal handler
around the signal. */
-int sigaction(int sig, const struct sigaction * act,
+int __sigaction(int sig, const struct sigaction * act,
struct sigaction * oact)
{
struct sigaction newact;
@@ -159,7 +159,7 @@ int sigaction(int sig, const struct sigaction * act,
}
else
newactp = NULL;
- if (__sigaction(sig, newactp, oact) == -1)
+ if (__libc_sigaction(sig, newactp, oact) == -1)
return -1;
if (sig > 0 && sig < NSIG)
{
@@ -172,6 +172,7 @@ int sigaction(int sig, const struct sigaction * act,
}
return 0;
}
+strong_alias(__sigaction, sigaction)
/* A signal handler that does nothing */
static void pthread_null_sighandler(int sig) { }
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index 96f3955..6609ef7 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -107,7 +107,7 @@ static inline int __pthread_trylock (struct _pthread_fastlock * lock)
#endif
#if !defined HAS_COMPARE_AND_SWAP
{
- return (testandset(&lock->__spinlock) : EBUSY : 0)
+ return (testandset(&lock->__spinlock) ? EBUSY : 0);
}
#endif