summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_timer.c')
-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