summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sig.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>1999-09-29 15:18:46 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>1999-09-29 15:18:46 +0000
commit3cf3c5d9ddb2edd1033c0b8e612096b8b35b3bb4 (patch)
treef20b5cb25cf94c494095050b1f52676e7efd71f7 /lib/libpthread/thread/thr_sig.c
parent956d3333cadea27513348a7718e9cfd5c26e9ba0 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r--lib/libpthread/thread/thr_sig.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index b6aad9ce7e67..3f31a34ab003 100644
--- a/lib/libpthread/thread/thr_sig.c
+++ b/lib/libpthread/thread/thr_sig.c
@@ -31,6 +31,9 @@
*
* $FreeBSD$
*/
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/signalvar.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
@@ -62,7 +65,7 @@ _thread_sig_init(void)
}
void
-_thread_sig_handler(int sig, int code, struct sigcontext * scp)
+_thread_sig_handler(int sig, int code, ucontext_t * scp)
{
char c;
int i;
@@ -148,7 +151,7 @@ _thread_sig_handler(int sig, int code, struct sigcontext * scp)
}
void
-_thread_sig_handle(int sig, struct sigcontext * scp)
+_thread_sig_handle(int sig, ucontext_t * scp)
{
int i;
pthread_t pthread, pthread_next;
@@ -360,13 +363,16 @@ _thread_signal(pthread_t pthread, int sig)
void
_dispatch_signals()
{
+ sigset_t sigset;
int i;
/*
* Check if there are pending signals for the running
* thread that aren't blocked:
*/
- if ((_thread_run->sigpend & ~_thread_run->sigmask) != 0)
+ sigset = _thread_run->sigpend;
+ SIGSETNAND(sigset, _thread_run->sigmask);
+ if (SIGNOTEMPTY(sigset))
/* Look for all possible pending signals: */
for (i = 1; i < NSIG; i++)
/*