X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer.c;h=45ce64b44a892165bb5247c9d7b63c1b49fbdf58;hb=7af44c59736ad212ad0f7b0269493db8d5122dc5;hp=bb1e5cfba3bc6cfdb1aaa6813b57b717e9109dbb;hpb=ac3dc4364ae7ec13d5dd8462d4da1b26a86f788f;p=bertos.git diff --git a/drv/timer.c b/drv/timer.c index bb1e5cfb..45ce64b4 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,7 @@ #if CONFIG_KERNEL #include + #include #if CONFIG_KERN_SIGNALS #include /* sig_wait(), sig_check() */ #include /* proc_current() */ @@ -173,9 +178,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