summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_etimer.h
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2004-06-24 19:35:28 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2004-06-24 19:35:28 +0000
commitc6cc17e855e1d9fe177fba41d00de6e89fdc852e (patch)
treebdc6bde04c820ca59fe49d60185cf6ac40b44e30 /sys/dev/raidframe/rf_etimer.h
parent128dd71ffeec48b94e085c757b3626553d619e7c (diff)
This moves access to wall and uptime variables in MI code,
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
Diffstat (limited to 'sys/dev/raidframe/rf_etimer.h')
-rw-r--r--sys/dev/raidframe/rf_etimer.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/raidframe/rf_etimer.h b/sys/dev/raidframe/rf_etimer.h
index 197433740a1..5b632f74ea4 100644
--- a/sys/dev/raidframe/rf_etimer.h
+++ b/sys/dev/raidframe/rf_etimer.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_etimer.h,v 1.6 2002/12/16 07:01:03 tdeval Exp $ */
+/* $OpenBSD: rf_etimer.h,v 1.7 2004/06/24 19:35:24 tholo Exp $ */
/* $NetBSD: rf_etimer.h,v 1.4 1999/08/13 03:26:55 oster Exp $ */
/*
@@ -48,19 +48,13 @@ struct RF_Etimer_s {
#define RF_ETIMER_START(_t_) \
do { \
- int s; \
bzero(&(_t_), sizeof (_t_)); \
- s = splclock(); \
- (_t_).st = mono_time; \
- splx(s); \
+ getmicrouptime(&(_t_).st); \
} while (0)
#define RF_ETIMER_STOP(_t_) \
do { \
- int s; \
- s = splclock(); \
- (_t_).et = mono_time; \
- splx(s); \
+ getmicrouptime(&(_t_).et); \
} while (0)
#define RF_ETIMER_EVAL(_t_) \