From 58079161621b9602b4fc2ceee93e9c8ced3be89a Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 28 Feb 2003 21:30:31 +0000 Subject: update lasttick in clockintr() so that time doesn't run away with us (based on a larger diff from henric). --- sys/arch/sparc64/sparc64/clock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64') 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); } -- cgit v1.2.3