diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-02-28 21:30:31 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-02-28 21:30:31 +0000 |
commit | 58079161621b9602b4fc2ceee93e9c8ced3be89a (patch) | |
tree | aa079bdfa6aff2f271b450de108c49d0a9140f2f /sys/arch/sparc64 | |
parent | f507e02165508482697191f85d6088e3e8f1fb25 (diff) |
update lasttick in clockintr() so that time doesn't run away with us
(based on a larger diff from henric).
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/clock.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c index ce2b0a1e01a..a63440229bd 100644 --- a/sys/arch/sparc64/sparc64/clock.c +++ b/sys/arch/sparc64/sparc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.16 2003/02/22 23:50:37 jason Exp $ */ +/* $OpenBSD: clock.c,v 1.17 2003/02/28 21:30:30 jason Exp $ */ /* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */ /* @@ -763,7 +763,9 @@ clockintr(cap) { #ifdef DEBUG static int64_t tick_base = 0; - int64_t t = (u_int64_t)tick(); + int64_t t; + + t = tick() & TICK_TICKS; if (!tick_base) { tick_base = (time.tv_sec * 1000000LL + time.tv_usec) @@ -788,6 +790,9 @@ clockintr(cap) #endif /* Let locore.s clear the interrupt for us. */ hardclock((struct clockframe *)cap); + + lasttick = tick() & TICK_TICKS; + return (1); } |