diff options
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/include/ch.h | 13 | ||||
-rw-r--r-- | os/kernel/include/chsys.h | 3 | ||||
-rw-r--r-- | os/kernel/src/chsys.c | 6 |
3 files changed, 18 insertions, 4 deletions
diff --git a/os/kernel/include/ch.h b/os/kernel/include/ch.h index 6f783c00c..3641c826f 100644 --- a/os/kernel/include/ch.h +++ b/os/kernel/include/ch.h @@ -88,8 +88,21 @@ #include "chqueues.h"
#include "chstreams.h"
#include "chioch.h"
+#include "chfiles.h"
#include "chdebug.h"
+#if !defined(__DOXYGEN__)
+extern WORKING_AREA(_idle_thread_wa, IDLE_THREAD_STACK_SIZE);
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void _idle_thread(void *p);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CH_H_ */
/** @} */
diff --git a/os/kernel/include/chsys.h b/os/kernel/include/chsys.h index ae013d7c7..2f94c5209 100644 --- a/os/kernel/include/chsys.h +++ b/os/kernel/include/chsys.h @@ -178,12 +178,9 @@ */
#define CH_FAST_IRQ_HANDLER(id) PORT_FAST_IRQ_HANDLER(id)
-extern WORKING_AREA(_idle_thread_wa, IDLE_THREAD_STACK_SIZE);
-
#ifdef __cplusplus
extern "C" {
#endif
- void _idle_thread(void *p);
void chSysInit(void);
void chSysTimerHandlerI(void);
#if CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 80d037dd6..d34e7e73a 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -34,6 +34,10 @@ #include "ch.h"
+/**
+ * @brief Idle thread working area.
+ * @see IDLE_THREAD_STACK_SIZE + */
WORKING_AREA(_idle_thread_wa, IDLE_THREAD_STACK_SIZE);
/**
@@ -87,7 +91,7 @@ void chSysInit(void) { /* This thread has the lowest priority in the system, its role is just to
serve interrupts in its context while keeping the lowest energy saving
mode compatible with the system status.*/
- chThdCreateStatic(idle_thread_wa, sizeof(_idle_thread_wa), IDLEPRIO,
+ chThdCreateStatic(_idle_thread_wa, sizeof(_idle_thread_wa), IDLEPRIO,
(tfunc_t)_idle_thread, NULL);
}
|