summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-01-08 01:49:31 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-01-08 01:49:31 +0000
commitd1f7b6d6058fadd65e506ebb78cf2f0bf59c1819 (patch)
tree0708dd0f657beefe0270f849827031904d420587 /lib
parent4c4f33983827d1da23453594c50654560d6dd725 (diff)
downloadFreeBSD-src-d1f7b6d6058fadd65e506ebb78cf2f0bf59c1819.zip
FreeBSD-src-d1f7b6d6058fadd65e506ebb78cf2f0bf59c1819.tar.gz
Allow background threads to be suspended.
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_timer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_timer.c b/lib/libthr/thread/thr_timer.c
index c5f204e..7e3fba0 100644
--- a/lib/libthr/thread/thr_timer.c
+++ b/lib/libthr/thread/thr_timer.c
@@ -97,7 +97,7 @@ __weak_reference(__mq_notify, _mq_notify);
__weak_reference(___mq_close, mq_close);
__weak_reference(___mq_close, _mq_close);
-#define SIGSERVICE SIGCANCEL /* Reuse SIGCANCEL */
+#define SIGSERVICE (SIGCANCEL+1)
#define RT_WORKING 0x01
#define RT_WANTED 0x02
@@ -478,6 +478,9 @@ service_loop(void *arg)
setjmp(tn->tn_jbuf);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
sigemptyset(&set);
+ sigaddset(&set, SIGCANCEL);
+ __sys_sigprocmask(SIG_UNBLOCK, &set, NULL);
+ sigdelset(&set, SIGCANCEL);
sigaddset(&set, SIGSERVICE);
THR_CLEANUP_PUSH(curthread, thread_cleanup, tn);
while (tn->tn_exit == 0) {
OpenPOWER on IntegriCloud