Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/sparc64/include Apply patch (requested by naka...
details: https://anonhg.NetBSD.org/src/rev/4defa939f4fd
branches: netbsd-1-6
changeset: 530425:4defa939f4fd
user: grant <grant%NetBSD.org@localhost>
date: Tue Jun 24 09:30:52 2003 +0000
description:
Apply patch (requested by nakayama in ticket #1329):
Switch to use cycle counter (%tick) based microtime().
This is derived from alpha/microtime.c and i386/tsc_microtime.c,
and will share with both ports.
diffstat:
sys/arch/sparc64/include/cpu.h | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r c513cad62493 -r 4defa939f4fd sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h Tue Jun 24 09:30:09 2003 +0000
+++ b/sys/arch/sparc64/include/cpu.h Tue Jun 24 09:30:52 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.31 2002/05/14 21:21:45 eeh Exp $ */
+/* $NetBSD: cpu.h,v 1.31.4.1 2003/06/24 09:30:52 grant Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -101,6 +101,14 @@
int ci_upaid;
struct schedstate_percpu ci_schedstate; /* scheduler state */
+ /*
+ * Variables used by cc_microtime().
+ */
+ struct timeval ci_cc_time;
+ int64_t ci_cc_cc;
+ int64_t ci_cc_ms_delta;
+ int64_t ci_cc_denom;
+
/* DEBUG/DIAGNOSTIC stuff */
u_long ci_spin_locks; /* # of spin locks held */
u_long ci_simple_locks;/* # of simple locks held */
@@ -134,6 +142,16 @@
#endif
/*
+ * definitions for MI microtime().
+ */
+extern struct timeval cc_microset_time;
+#define microtime(tv) cc_microtime(tv)
+void cc_microtime __P((struct timeval *));
+void cc_microset __P((struct cpu_info *));
+
+extern uint64_t cpu_clockrate[];
+
+/*
* Arguments to hardclock, softclock and gatherstats encapsulate the
* previous machine state in an opaque clockframe. The ipl is here
* as well for strayintr (see locore.s:interrupt and intr.c:strayintr).
Home |
Main Index |
Thread Index |
Old Index