diff options
Diffstat (limited to 'os/kernel/src/chsys.c')
-rw-r--r-- | os/kernel/src/chsys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index eeed4a998..1a66c8e98 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -80,7 +80,8 @@ void chSysInit(void) { #endif
/* Now this instructions flow becomes the main thread.*/
- (currp = init_thread(&mainthread, NORMALPRIO))->p_state = THD_STATE_CURRENT;
+ setcurrp(init_thread(&mainthread, NORMALPRIO));
+ currp->p_state = THD_STATE_CURRENT;
chSysEnable();
/* This thread has the lowest priority in the system, its role is just to
|