summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_clock.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index b8c4608d238..e773752aee7 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.96 2018/10/10 00:04:54 bluhm Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.97 2018/10/17 12:25:38 bluhm Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -378,19 +378,18 @@ statclock(struct clockframe *frame)
* so that we know how much of its real time was spent
* in ``non-process'' (i.e., interrupt) work.
*/
- if (spc->spc_spinning) {
- if (p != NULL && p != spc->spc_idleproc)
- p->p_sticks++;
- spc->spc_cp_time[CP_SPIN]++;
- } else if (CLKF_INTR(frame)) {
+ if (CLKF_INTR(frame)) {
if (p != NULL)
p->p_iticks++;
- spc->spc_cp_time[CP_INTR]++;
+ spc->spc_cp_time[spc->spc_spinning ?
+ CP_SPIN : CP_INTR]++;
} else if (p != NULL && p != spc->spc_idleproc) {
p->p_sticks++;
- spc->spc_cp_time[CP_SYS]++;
+ spc->spc_cp_time[spc->spc_spinning ?
+ CP_SPIN : CP_SYS]++;
} else
- spc->spc_cp_time[CP_IDLE]++;
+ spc->spc_cp_time[spc->spc_spinning ?
+ CP_SPIN : CP_IDLE]++;
}
spc->spc_pscnt = psdiv;