X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=drv%2Ftimer.c;h=0e756dbb6cb01c435062380cbd60536d0e165520;hb=faf2f6bfd5933ff75e6cc01e3d48f9277f731d8f;hp=3805e3b0189f9c846738151de8e2a8b658076c57;hpb=42cfb32d63a5a136a8d17594f0ded8102a35887c;p=bertos.git diff --git a/drv/timer.c b/drv/timer.c index 3805e3b0..0e756dbb 100644 --- a/drv/timer.c +++ b/drv/timer.c @@ -74,7 +74,9 @@ #if CONFIG_KERNEL #include - #include + #if CONFIG_KERN_PREEMPTIVE + #include + #endif #if CONFIG_KERN_SIGNALS #include /* sig_wait(), sig_check() */ #include /* proc_current() */ @@ -263,8 +265,6 @@ void timer_delayHp(hptime_t delay) */ DEFINE_TIMER_ISR { - SCHEDULER_IRQ_ENTRY; - /* * With the Metrowerks compiler, the only way to force the compiler generate * an interrupt service routine is to put a pragma directive within the function @@ -282,7 +282,7 @@ DEFINE_TIMER_ISR * to ensure that IRQ is generated by timer source. */ if (!timer_hw_triggered()) - SCHEDULER_IRQ_EXIT; + return; TIMER_STROBE_ON; @@ -316,8 +316,6 @@ DEFINE_TIMER_ISR #endif /* CONFIG_TIMER_DISABLE_EVENTS */ TIMER_STROBE_OFF; - - SCHEDULER_IRQ_EXIT; } MOD_DEFINE(timer)