X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer.c;h=0e756dbb6cb01c435062380cbd60536d0e165520;hb=2535cb94ec2183791128f8bbd109ca69a960cf78;hp=b25afba5cc53e75fb76777fa59f6f50f3afd6275;hpb=c338086be997ecb73aacaea64b5a8eb1c11a614c;p=bertos.git diff --git a/drv/timer.c b/drv/timer.c index b25afba5..0e756dbb 100644 --- a/drv/timer.c +++ b/drv/timer.c @@ -38,7 +38,11 @@ */ #include "timer.h" -#include + +#include +#include +#include + #include #include #include @@ -70,6 +74,9 @@ #if CONFIG_KERNEL #include + #if CONFIG_KERN_PREEMPTIVE + #include + #endif #if CONFIG_KERN_SIGNALS #include /* sig_wait(), sig_check() */ #include /* proc_current() */ @@ -173,9 +180,9 @@ Timer *timer_abort(Timer *timer) */ void timer_delayTicks(ticks_t delay) { -#if defined(IRQ_GETSTATE) +#if defined(IRQ_ENABLED) /* We shouldn't sleep with interrupts disabled */ - ASSERT(IRQ_GETSTATE()); + ASSERT(IRQ_ENABLED()); #endif #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS