X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.c;h=bd0ff9daed9ec26bfe5ae35ff5266917b72329b1;hb=e62ca0b357f09804d7d894949df44224c9d74bb7;hp=c0106d85bbe515a32747c977e1ced7e48016b5e8;hpb=ae263f1c0564f616b3b557498532163ffb60595f;p=bertos.git diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index c0106d85..bd0ff9da 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -63,8 +63,8 @@ /* * Sanity check for config parameters required by this module. */ -#if !defined(CONFIG_KERNEL) || ((CONFIG_KERNEL != 0) && CONFIG_KERNEL != 1) - #error CONFIG_KERNEL must be set to either 0 or 1 in config.h +#if !defined(CONFIG_KERN) || ((CONFIG_KERN != 0) && CONFIG_KERN != 1) + #error CONFIG_KERN must be set to either 0 or 1 in config.h #endif #if !defined(CONFIG_WATCHDOG) || ((CONFIG_WATCHDOG != 0) && CONFIG_WATCHDOG != 1) #error CONFIG_WATCHDOG must be set to either 0 or 1 in config.h @@ -74,12 +74,10 @@ #include #endif -#if CONFIG_KERNEL - #if CONFIG_KERN_SIGNALS - #include /* sig_wait(), sig_check() */ - #include /* proc_current() */ - #include /* BV() */ - #endif +#if defined (CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS + #include /* sig_wait(), sig_check() */ + #include /* proc_current() */ + #include /* BV() */ #endif @@ -122,7 +120,7 @@ REGISTER static List timers_queue; void timer_add(Timer *timer) { Timer *node; - cpuflags_t flags; + cpu_flags_t flags; /* Inserting timers twice causes mayhem. */ @@ -182,7 +180,7 @@ Timer *timer_abort(Timer *timer) void timer_delayTicks(ticks_t delay) { /* We shouldn't sleep with interrupts disabled */ - ASSERT_IRQ_ENABLED(); + IRQ_ASSERT_ENABLED(); #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS Timer t;