mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Allow background threads to be suspended.
This commit is contained in:
parent
0d29c148eb
commit
23db0a33f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154106
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue