Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm32/footbridge Fix microtime() to sanely handle c...



details:   https://anonhg.NetBSD.org/src/rev/f8c1cab1691b
branches:  trunk
changeset: 472159:f8c1cab1691b
user:      mark <mark%NetBSD.org@localhost>
date:      Fri Apr 23 09:09:04 1999 +0000

description:
Fix microtime() to sanely handle calls before the clocks have been
initialized. This is the DC21285 version of the IOMD fix for PR7357.

diffstat:

 sys/arch/arm32/footbridge/footbridge_clock.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 6566f5b3d1f3 -r f8c1cab1691b sys/arch/arm32/footbridge/footbridge_clock.c
--- a/sys/arch/arm32/footbridge/footbridge_clock.c      Fri Apr 23 08:20:28 1999 +0000
+++ b/sys/arch/arm32/footbridge/footbridge_clock.c      Fri Apr 23 09:09:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_clock.c,v 1.1 1998/09/06 02:20:34 mark Exp $        */
+/*     $NetBSD: footbridge_clock.c,v 1.2 1999/04/23 09:09:04 mark Exp $        */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -242,6 +242,9 @@
        int deltatm;
        static struct timeval oldtv;
 
+       if (clock_sc == NULL || clock_sc->sc_clock_count == 0)
+               return;
+
        s = splhigh();
 
        tm = bus_space_read_4(clock_sc->sc_iot, clock_sc->sc_ioh,



Home | Main Index | Thread Index | Old Index