diff options
author | jeff <jeff@FreeBSD.org> | 2002-11-21 09:30:55 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-11-21 09:30:55 +0000 |
commit | d5eb61ea8d5cf09af5c88effaa1786a4a9fad320 (patch) | |
tree | fde42729368c00945f803b78aa2601387000aefe /sys/kern | |
parent | de79ec94a5618dc0948e9e4033e44e677d1ae16a (diff) | |
download | FreeBSD-src-d5eb61ea8d5cf09af5c88effaa1786a4a9fad320.zip FreeBSD-src-d5eb61ea8d5cf09af5c88effaa1786a4a9fad320.tar.gz |
- Add the new sched_pctcpu() function to the sched_* api.
- Provide a routine in sched_4bsd to add this functionality.
- Use sched_pctcpu() in kern_proc, which is the one place outside of
sched_4bsd where the old pctcpu value was accessed directly.
Approved by: re
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_proc.c | 2 | ||||
-rw-r--r-- | sys/kern/sched_4bsd.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index cf9de34..e3737d7 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -756,7 +756,7 @@ fill_kinfo_proc(p, kp) /* Things in the kse */ kp->ki_rqindex = ke->ke_rqindex; kp->ki_oncpu = ke->ke_oncpu; - kp->ki_pctcpu = ke->ke_pctcpu; + kp->ki_pctcpu = sched_pctcpu(ke); } else { kp->ki_oncpu = -1; kp->ki_lastcpu = -1; diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 04ed3f3..7c4aa80 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -648,3 +648,9 @@ sched_sizeof_thread(void) { return (sizeof(struct thread)); } + +fixpt_t +sched_pctcpu(struct kse *ke) +{ + return (ke->ke_pctcpu); +} |