summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2004-06-20 19:33:08 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2004-06-20 19:33:08 +0000
commita38e19efb348e2f3a8d4199801b41ffbf4900ff9 (patch)
tree419326080394972c44ef9f2db0b76ccf85ab5de2 /sys/arch/i386
parent2343305e967b9fcab1f332412a890328618945cf (diff)
Init per-cpu spc_runtime before diving into the scheduler. From NetBSD.
Fixes bogus process runtimes (I happened to notice it with USB kernel threads) as shown in ps and top. niklas@, deraadt@ ok
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c
index 62955e317dd..fb945ce6a92 100644
--- a/sys/arch/i386/i386/cpu.c
+++ b/sys/arch/i386/i386/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.4 2004/06/17 00:37:24 deraadt Exp $ */
+/* $OpenBSD: cpu.c,v 1.5 2004/06/20 19:33:07 aaron Exp $ */
/* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */
/*-
@@ -456,6 +456,7 @@ cpu_hatch(void *v)
lapic_tpr = 0;
enable_intr();
printf("%s: CPU at apid %ld running\n", ci->ci_dev.dv_xname, ci->ci_cpuid);
+ microtime(&ci->ci_schedstate.spc_runtime);
splx(s);
}