diff options
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 6b37181..d46ef12 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. |