aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-10-01 14:10:08 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-10-01 14:10:08 +0000
commit1d564145150e3f6ae0ae972771eee76e5440c824 (patch)
tree4ccf916421c5f48c1dce43a4dee555fde1729e80 /sys
parentc2b6013026cc4b171c890e3569d3b6fcc32b3dcc (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_synch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 6b37181f5cc0c..d46ef12900c45 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -786,12 +786,15 @@ mi_switch(void)
#endif
/*
- * Check if the process exceeds its cpu resource allocation.
+ * Check if the process exceeds its cpu resource allocation. If
+ * over max, arrange to kill the process in ast().
*/
if (p->p_state != PRS_ZOMBIE &&
p->p_limit->p_cpulimit != RLIM_INFINITY &&
- p->p_runtime.sec > p->p_limit->p_cpulimit)
+ p->p_runtime.sec > p->p_limit->p_cpulimit) {
p->p_sflag |= PS_XCPU;
+ ke->ke_flags |= KEF_ASTPENDING;
+ }
/*
* Finish up stats for outgoing thread.