aboutsummaryrefslogtreecommitdiffstats
path: root/src/chinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chinit.c')
-rw-r--r--src/chinit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/chinit.c b/src/chinit.c
index 0d4aafea1..9162d84f1 100644
--- a/src/chinit.c
+++ b/src/chinit.c
@@ -43,15 +43,10 @@ void chSysInit(void) {
#ifdef CH_USE_HEAP
chHeapInit();
#endif
-#ifdef CH_USE_HEAP
- chHeapInit();
-#endif
/*
* Now this instructions flow becomes the main thread.
*/
- init_thread(&mainthread, NORMALPRIO);
- mainthread.p_state = PRCURR;
- currp = &mainthread;
+ (currp = init_thread(&mainthread, NORMALPRIO))->p_state = PRCURR;
chSysEnable();