projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the bug related to the empty version list
[bertos.git]
/
bertos
/
drv
/
timer.c
diff --git
a/bertos/drv/timer.c
b/bertos/drv/timer.c
index 285d67c55e1242bfd772e0f2602c1637424a68e2..d832059086a563134303e16f87146f5cd1691bba 100644
(file)
--- a/
bertos/drv/timer.c
+++ b/
bertos/drv/timer.c
@@
-40,7
+40,8
@@
#include "cfg/cfg_timer.h"
#include "cfg/cfg_wdt.h"
#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>
#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/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.
/*
* Include platform-specific binding code if we're hosted.
@@
-57,7
+59,10
@@
//#include OS_CSOURCE(timer)
#include <emul/timer_posix.c>
#else
//#include OS_CSOURCE(timer)
#include <emul/timer_posix.c>
#else
- #include CPU_CSOURCE(timer)
+ #ifndef WIZ_AUTOGEN
+ #warning Deprecated: now you should include timer_<cpu> directly in the makefile. Remove this line and the following once done.
+ #include CPU_CSOURCE(timer)
+ #endif
#endif
/*
#endif
/*
@@
-120,7
+125,7
@@
REGISTER static List timers_queue;
void timer_add(Timer *timer)
{
Timer *node;
void timer_add(Timer *timer)
{
Timer *node;
- cpuflags_t flags;
+ cpu
_
flags_t flags;
/* Inserting timers twice causes mayhem. */
/* Inserting timers twice causes mayhem. */
@@
-197,11
+202,7
@@
void timer_delayTicks(ticks_t delay)
/* Busy wait */
while (timer_clock() - start < delay)
/* Busy wait */
while (timer_clock() - start < delay)
- {
-#if CONFIG_WATCHDOG
- wdt_reset();
-#endif
- }
+ cpu_relax();
#endif /* !CONFIG_KERN_SIGNALS */
}
#endif /* !CONFIG_KERN_SIGNALS */
}