diff options
author | kib <kib@FreeBSD.org> | 2009-07-14 22:52:46 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-07-14 22:52:46 +0000 |
commit | c7441b67e68fb8dbdec2ca853f77acf72e7cf0e9 (patch) | |
tree | b51305b6f0c522d37eac747f4cbb29242078546b /sys/kern/kern_synch.c | |
parent | aa9063dc970560b1ab26b34f292e63ad270cb4c4 (diff) | |
download | FreeBSD-src-c7441b67e68fb8dbdec2ca853f77acf72e7cf0e9.zip FreeBSD-src-c7441b67e68fb8dbdec2ca853f77acf72e7cf0e9.tar.gz |
Add new msleep(9) flag PBDY that shall be specified together with
PCATCH, to indicate that thread shall not be stopped upon receipt of
SIGSTOP until it reaches the kernel->usermode boundary.
Also change thread_single(SINGLE_NO_EXIT) to only stop threads at
the user boundary unconditionally.
Tested by: pho
Reviewed by: jhb
Approved by: re (kensmith)
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index aad12b6..30a8bb3 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -188,6 +188,8 @@ _sleep(void *ident, struct lock_object *lock, int priority, flags = SLEEPQ_SLEEP; if (catch) flags |= SLEEPQ_INTERRUPTIBLE; + if (priority & PBDRY) + flags |= SLEEPQ_STOP_ON_BDRY; sleepq_lock(ident); CTR5(KTR_PROC, "sleep: thread %ld (pid %ld, %s) on %s (%p)", |