Update to new kernel config; use cpu_relax().
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 25 Mar 2009 15:58:24 +0000 (15:58 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 25 Mar 2009 15:58:24 +0000 (15:58 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2419 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/timer.c

index bd0ff9daed9ec26bfe5ae35ff5266917b72329b1..7e99d78ee8822b9e6eeaadbdd434b09c221fc8ac 100644 (file)
@@ -40,7 +40,8 @@
 
 #include "cfg/cfg_timer.h"
 #include "cfg/cfg_wdt.h"
-#include "cfg/cfg_kern.h"
+#include "cfg/cfg_proc.h"
+#include "cfg/cfg_signal.h"
 #include <cfg/os.h>
 #include <cfg/debug.h>
 #include <cfg/module.h>
@@ -48,6 +49,7 @@
 #include <cpu/attr.h>
 #include <cpu/types.h>
 #include <cpu/irq.h>
+#include <cpu/power.h> // cpu_relax()
 
 /*
  * Include platform-specific binding code if we're hosted.
@@ -197,11 +199,7 @@ void timer_delayTicks(ticks_t delay)
 
        /* Busy wait */
        while (timer_clock() - start < delay)
-       {
-#if CONFIG_WATCHDOG
-               wdt_reset();
-#endif
-       }
+               cpu_relax();
 
 #endif /* !CONFIG_KERN_SIGNALS */
 }