Fix timer when run in bertos emulator.
authorqwert <qwert@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 29 Jul 2008 15:13:42 +0000 (15:13 +0000)
committerqwert <qwert@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 29 Jul 2008 15:13:42 +0000 (15:13 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1531 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/timer.c

index 81f87942716989f62d3fe375a8e59dfd50993597..808a6a7fba25fa24d59b5d955ae760fb70ef992f 100644 (file)
@@ -181,11 +181,12 @@ Timer *timer_abort(Timer *timer)
  */
 void timer_delayTicks(ticks_t delay)
 {
-#if defined(IRQ_ENABLED)
+#if defined(IRQ_ENABLED) && (!(ARCH & ARCH_EMUL))
        /* We shouldn't sleep with interrupts disabled */
        ASSERT(IRQ_ENABLED());
 #endif
 
+
 #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS
        Timer t;