aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authorSteve Passe <fsmp@FreeBSD.org>1997-12-08 23:00:24 +0000
committerSteve Passe <fsmp@FreeBSD.org>1997-12-08 23:00:24 +0000
commiteae8fc2c8a9d1acc07bfa247561327da5183037d (patch)
tree20645b308299f68dbba9bbd7e81e519e38073267 /sys/kern/kern_clock.c
parentbaf41202ca4cd457abca4db5ac7fccff64bc491b (diff)
downloadsrc-eae8fc2c8a9d1acc07bfa247561327da5183037d.tar.gz
src-eae8fc2c8a9d1acc07bfa247561327da5183037d.zip
Notes
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 5f138615a64f..220e4b534858 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_clock.c,v 1.44 1997/11/18 12:24:22 bde Exp $
+ * $Id: kern_clock.c,v 1.45 1997/11/24 15:15:27 bde Exp $
*/
/* Portions of this software are covered by the following: */
@@ -80,6 +80,10 @@
#include <sys/gmon.h>
#endif
+#if defined(SMP) && defined(BETTER_CLOCK)
+#include <machine/smp.h>
+#endif
+
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
@@ -91,7 +95,11 @@ struct callout_tailq *callwheel;
/* Some of these don't belong here, but it's easiest to concentrate them. */
+#if defined(SMP) && defined(BETTER_CLOCK)
+long cp_time[CPUSTATES];
+#else
static long cp_time[CPUSTATES];
+#endif
long dk_seek[DK_NDRIVE];
static long dk_time[DK_NDRIVE]; /* time busy (in statclock ticks) */
long dk_wds[DK_NDRIVE];
@@ -471,6 +479,9 @@ hardclock(frame)
psignal(p, SIGPROF);
}
+#if defined(SMP) && defined(BETTER_CLOCK)
+ forward_hardclock(pscnt);
+#endif
/*
* If no separate statistics clock is available, run it from here.
*/
@@ -971,6 +982,10 @@ statclock(frame)
p = curproc;
if (p->p_flag & P_PROFIL)
addupc_intr(p, CLKF_PC(frame), 1);
+#if defined(SMP) && defined(BETTER_CLOCK)
+ if (stathz != 0)
+ forward_statclock(pscnt);
+#endif
if (--pscnt > 0)
return;
/*
@@ -996,6 +1011,10 @@ statclock(frame)
}
}
#endif
+#if defined(SMP) && defined(BETTER_CLOCK)
+ if (stathz != 0)
+ forward_statclock(pscnt);
+#endif
if (--pscnt > 0)
return;
/*