Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sa11x0 Add check for microtime() being called b...
details: https://anonhg.NetBSD.org/src/rev/b837c7ce61e6
branches: trunk
changeset: 520360:b837c7ce61e6
user: rjs <rjs%NetBSD.org@localhost>
date: Tue Jan 08 11:21:02 2002 +0000
description:
Add check for microtime() being called before clock is initialized.
diffstat:
sys/arch/arm/sa11x0/sa11x0_ost.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 29c06d7cd95b -r b837c7ce61e6 sys/arch/arm/sa11x0/sa11x0_ost.c
--- a/sys/arch/arm/sa11x0/sa11x0_ost.c Tue Jan 08 10:05:13 2002 +0000
+++ b/sys/arch/arm/sa11x0/sa11x0_ost.c Tue Jan 08 11:21:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa11x0_ost.c,v 1.4 2001/11/23 19:21:48 thorpej Exp $ */
+/* $NetBSD: sa11x0_ost.c,v 1.5 2002/01/08 11:21:02 rjs Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -270,11 +270,16 @@
microtime(tvp)
register struct timeval *tvp;
{
- int s = splhigh();
- int tm;
- int deltatm;
+ int s, tm, deltatm;
static struct timeval lasttime;
+ if(saost_sc == NULL) {
+ tvp->tv_sec = 0;
+ tvp->tv_usec = 0;
+ return;
+ }
+
+ s = splhigh();
tm = bus_space_read_4(saost_sc->sc_iot, saost_sc->sc_ioh,
SAOST_CR);
Home |
Main Index |
Thread Index |
Old Index