X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.c;h=0d78d198aaa3a6bb5690bab53f2ad59e49acb80f;hb=46b32fefc02b4b8fc3a9ee1e7225f3053b514a02;hp=942726399b1e47b0ebb102acd06b308592494ec7;hpb=515886be3106584a6d695d4b5453730121b91f74;p=bertos.git diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index 94272639..0d78d198 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -27,8 +27,7 @@ * the GNU General Public License. * * Copyright 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/) - * Copyright 2000 Bernie Innocenti - * + * Copyright 2000, 2008 Bernie Innocenti * --> * * \brief Hardware independent timer driver (implementation) @@ -75,9 +74,6 @@ #endif #if CONFIG_KERNEL - #if CONFIG_KERN_PREEMPTIVE - #include - #endif #if CONFIG_KERN_SIGNALS #include /* sig_wait(), sig_check() */ #include /* proc_current() */ @@ -164,6 +160,7 @@ void timer_add(Timer *timer) /** * Remove a timer from the timers queue before it has expired. + * * \note Attempting to remove a timer already expired cause * undefined behaviour. */ @@ -183,11 +180,8 @@ Timer *timer_abort(Timer *timer) */ void timer_delayTicks(ticks_t delay) { -#if defined(IRQ_ENABLED) && (!(ARCH & ARCH_EMUL)) /* We shouldn't sleep with interrupts disabled */ - ASSERT(IRQ_ENABLED()); -#endif - + ASSERT_IRQ_ENABLED(); #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS Timer t;