diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-05-15 23:15:06 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-05-15 23:15:06 +0000 |
| commit | 74fc7455949233769cfa21c942a3a912b34551a3 (patch) | |
| tree | f56a186c738c20cf1d43f94d68d0f21806ec3281 | |
| parent | 9081e5e8260f4856d7f4542328f2843b25f7c602 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_synch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index dc8d25ae5885..7d793de4ee2b 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -44,7 +44,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/condvar.h> -#include <sys/ipl.h> #include <sys/kernel.h> #include <sys/ktr.h> #include <sys/lock.h> @@ -885,8 +884,10 @@ mi_switch() rlim = &p->p_rlimit[RLIMIT_CPU]; if (p->p_runtime / (rlim_t)1000000 >= rlim->rlim_max) { mtx_unlock_spin(&sched_lock); + PROC_LOCK(p); killproc(p, "exceeded maximum CPU limit"); mtx_lock_spin(&sched_lock); + PROC_UNLOCK_NOSWITCH(p); } else { mtx_unlock_spin(&sched_lock); PROC_LOCK(p); |
