X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer.h;h=bd7b1f7e8154cb1ef760cda37cd6b9c02e9f01dc;hb=4e7233c06bec20fb90fd3b42dddbee78b5947ba3;hp=a75adfd26e1ec8dc8e5077cdeb38a7981b18d339;hpb=f5c3dd208e34a35779cb1ec315998e0eb4582578;p=bertos.git diff --git a/drv/timer.h b/drv/timer.h index a75adfd2..bd7b1f7e 100755 --- a/drv/timer.h +++ b/drv/timer.h @@ -15,6 +15,15 @@ /*#* *#* $Log$ + *#* Revision 1.24 2005/04/11 19:10:28 bernie + *#* Include top-level headers from cfg/ subdir. + *#* + *#* Revision 1.23 2005/03/01 23:25:46 bernie + *#* Move event.h to mware/. + *#* + *#* Revision 1.22 2004/12/13 12:07:06 bernie + *#* DISABLE_IRQSAVE/ENABLE_IRQRESTORE: Convert to IRQ_SAVE_DISABLE/IRQ_RESTORE. + *#* *#* Revision 1.21 2004/12/09 08:35:21 bernie *#* Replace IPTR with iptr_t. *#* @@ -78,9 +87,9 @@ #define DRV_TIMER_H #include -#include -#include -#include +#include +#include +#include /*! Number of timer ticks per second. */ #define TICKS_PER_SEC ((mtime_t)1000) @@ -96,11 +105,7 @@ extern void timer_udelay(utime_t utime); #ifndef CONFIG_TIMER_DISABLE_EVENTS -#if CONFIG_KERNEL - #include -#else - #include -#endif +#include /*! * The timer driver supports multiple synchronous timers @@ -173,11 +178,8 @@ extern volatile mtime_t _clock; INLINE mtime_t timer_ticks(void) { mtime_t result; - cpuflags_t flags; - DISABLE_IRQSAVE(flags); - result = _clock; - ENABLE_IRQRESTORE(flags); + ATOMIC(result = _clock); return result; }