Fix timer when run in bertos emulator.
[bertos.git] / bertos / drv / timer.c
index ca0605a792f8f9d92624ff403809943dabbca984..808a6a7fba25fa24d59b5d955ae760fb70ef992f 100644 (file)
@@ -39,9 +39,9 @@
 
 #include "timer.h"
 
-#include <cfg/cfg_timer.h>
-#include <cfg/cfg_wdt.h>
-#include <cfg/cfg_kern.h>
+#include "cfg/cfg_timer.h"
+#include "cfg/cfg_wdt.h"
+#include "cfg/cfg_kern.h"
 #include <cfg/os.h>
 #include <cfg/debug.h>
 #include <cfg/module.h>
@@ -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;