summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-11-27 12:32:27 +0000
committerbde <bde@FreeBSD.org>1999-11-27 12:32:27 +0000
commit4955977bad69ae0939c6eede4d50f3c8e9f843bf (patch)
tree5e379c99576655a86acc625c1e7b89043b3b1cfe /sys/i386/include/mptable.h
parent6661b59c9e36f23b9cbcf25f513565c3a64a7392 (diff)
downloadFreeBSD-src-4955977bad69ae0939c6eede4d50f3c8e9f843bf.zip
FreeBSD-src-4955977bad69ae0939c6eede4d50f3c8e9f843bf.tar.gz
Moved scheduling-related code to kern_synch.c so that it is easier to fix
and extend. The new function containing the code is named schedclock() as in NetBSD, but it has slightly different semantics (it already handles incrementation of p->p_cpticks, and it should handle any calling frequency). Agreed with in principle by: dufault
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index d101973..b565cee 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -2323,14 +2323,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
cp_time[CP_INTR]++;
}
if (p != NULL) {
- p->p_cpticks++;
- if (++p->p_estcpu == 0)
- p->p_estcpu--;
- if ((p->p_estcpu & 3) == 0) {
- resetpriority(p);
- if (p->p_priority >= PUSER)
- p->p_priority = p->p_usrpri;
- }
+ schedclock(p);
/* Update resource usage integrals and maximums. */
if ((pstats = p->p_stats) != NULL &&
OpenPOWER on IntegriCloud