aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chsys.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel/src/chsys.c')
-rw-r--r--os/kernel/src/chsys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c
index 29f4bdc7e..5d3c0bcf4 100644
--- a/os/kernel/src/chsys.c
+++ b/os/kernel/src/chsys.c
@@ -35,6 +35,7 @@
#include "ch.h"
+#if !CH_NO_IDLE_THREAD || defined(__DOXYGEN__)
/**
* @brief Idle thread working area.
* @see IDLE_THREAD_STACK_SIZE
@@ -59,6 +60,7 @@ void _idle_thread(void *p) {
IDLE_LOOP_HOOK();
}
}
+#endif /* CH_NO_IDLE_THREAD */
/**
* @brief ChibiOS/RT initialization.
@@ -93,11 +95,13 @@ void chSysInit(void) {
currp->p_state = THD_STATE_CURRENT;
chSysEnable();
+#if !CH_NO_IDLE_THREAD
/* 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,
(tfunc_t)_idle_thread, NULL);
+#endif
}
/**