aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
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 d825934e28..9af0269f65 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 94a18e528c..c52d88f4e1 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 a3f829f9ac..2700a29fb1 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 452d860f92..be9e5aa1a2 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 96f39551dd..6609ef71c9 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