diff options
author | jasone <jasone@FreeBSD.org> | 2001-01-16 01:00:43 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-01-16 01:00:43 +0000 |
commit | 20a8a23d2b99a3392aeb543a6d96167366f82e2a (patch) | |
tree | 6587dd7c0fd480a2d91b5a2c16e0d3ea150e4dce /sys/kern/kern_sig.c | |
parent | 437df10fdc957adbcfb372d6fc7638929d3df25e (diff) | |
download | FreeBSD-src-20a8a23d2b99a3392aeb543a6d96167366f82e2a.zip FreeBSD-src-20a8a23d2b99a3392aeb543a6d96167366f82e2a.tar.gz |
Implement condition variables.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 29d2b60..70a3569 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -56,6 +56,7 @@ #include <sys/acct.h> #include <sys/fcntl.h> #include <sys/ipl.h> +#include <sys/condvar.h> #include <sys/mutex.h> #include <sys/wait.h> #include <sys/ktr.h> @@ -1229,8 +1230,12 @@ psignal(p, sig) * the process runnable, leave it stopped. */ mtx_enter(&sched_lock, MTX_SPIN); - if (p->p_wchan && p->p_flag & P_SINTR) - unsleep(p); + if (p->p_wchan && p->p_flag & P_SINTR) { + if (p->p_flag & P_CVWAITQ) + cv_waitq_remove(p); + else + unsleep(p); + } mtx_exit(&sched_lock, MTX_SPIN); goto out; |