aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-03-27 07:51:13 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-03-27 07:51:13 +0000
commit5c65f9170061145006e20a37b2ba62f73598563a (patch)
treeccd4415d4e187c9820b345335e5d05df4037c7d7 /os
parentfefa1a82a0d255e13ec269af06c0a2c9ba402737 (diff)
downloadChibiOS-5c65f9170061145006e20a37b2ba62f73598563a.tar.gz
ChibiOS-5c65f9170061145006e20a37b2ba62f73598563a.tar.bz2
ChibiOS-5c65f9170061145006e20a37b2ba62f73598563a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9169 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/rt/src/chsys.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c
index 21a87a8a7..82a9e78d6 100644
--- a/os/rt/src/chsys.c
+++ b/os/rt/src/chsys.c
@@ -125,7 +125,11 @@ void chSysInit(void) {
#if CH_CFG_NO_IDLE_THREAD == FALSE
/* Now this instructions flow becomes the main thread.*/
+#if CH_CFG_USE_REGISTRY == TRUE
+ currp = _thread_init(&ch.mainthread, (const char *)&ch_debug, NORMALPRIO);
+#else
currp = _thread_init(&ch.mainthread, "main", NORMALPRIO);
+#endif
#else
/* Now this instructions flow becomes the idle thread.*/
currp = _thread_init(&ch.mainthread, "idle", IDLEPRIO);
@@ -149,12 +153,6 @@ void chSysInit(void) {
/* It is alive now.*/
chSysEnable();
-#if CH_CFG_USE_REGISTRY == TRUE
- /* Note, &ch_debug points to the string "main" if the registry is
- active.*/
- chRegSetThreadName((const char *)&ch_debug);
-#endif
-
#if CH_CFG_NO_IDLE_THREAD == FALSE
{
static const thread_descriptor_t idle_descriptor = {