aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-24 15:38:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-24 15:38:50 +0000
commitb21e9a01e5590dd3fe015aeffbe2a15e985af865 (patch)
tree02aff7f1f88e57607ebb6f55efff75ab35237f10 /os
parent7aaa7099fd19d774701f7a4b60cf07d1a292fd22 (diff)
downloadChibiOS-b21e9a01e5590dd3fe015aeffbe2a15e985af865.tar.gz
ChibiOS-b21e9a01e5590dd3fe015aeffbe2a15e985af865.tar.bz2
ChibiOS-b21e9a01e5590dd3fe015aeffbe2a15e985af865.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6027 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/kernel/src/chsys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c
index 61157b1b9..7a6d3ea20 100644
--- a/os/kernel/src/chsys.c
+++ b/os/kernel/src/chsys.c
@@ -115,8 +115,14 @@ void chSysInit(void) {
_trace_init();
#endif
+#if !CH_CFG_NO_IDLE_THREAD
/* Now this instructions flow becomes the main thread.*/
setcurrp(_thread_init(&mainthread, NORMALPRIO));
+#else
+ /* Now this instructions flow becomes the main thread.*/
+ setcurrp(_thread_init(&mainthread, IDLEPRIO));
+#endif
+
currp->p_state = CH_STATE_CURRENT;
#if CH_DBG_ENABLE_STACK_CHECK
/* This is a special case because the main thread thread_t structure is not