From 5c65f9170061145006e20a37b2ba62f73598563a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 27 Mar 2016 07:51:13 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9169 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chsys.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'os/rt/src') 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 = { -- cgit v1.2.3