aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chsys.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-06-28 11:40:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-06-28 11:40:14 +0000
commit8131d84ea72494d9b60b0ad7477a9f63a1b43f94 (patch)
treea6dd7cd11a7c5dd9e08586c7565d0c184e03d775 /os/rt/src/chsys.c
parent32490c00b3f484d228f1a7b80d19213c5c935c9c (diff)
downloadChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.tar.gz
ChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.tar.bz2
ChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.zip
lwIP bindings improvements. Added new function chRegSetThreadNamex().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8058 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chsys.c')
-rw-r--r--os/rt/src/chsys.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c
index 5e1b0dba7..a76fb7c65 100644
--- a/os/rt/src/chsys.c
+++ b/os/rt/src/chsys.c
@@ -65,7 +65,7 @@
static void _idle_thread(void *p) {
(void)p;
- chRegSetThreadName("idle");
+
while (true) {
/*lint -save -e522 [2.2] Apparently no side effects because it contains
an asm instruction.*/
@@ -135,11 +135,17 @@ void chSysInit(void) {
chRegSetThreadName((const char *)&ch_debug);
#if CH_CFG_NO_IDLE_THREAD == FALSE
+ {
/* This thread has the lowest priority in the system, its role is just to
serve interrupts in its context while keeping the lowest energy saving
mode compatible with the system status.*/
- (void) chThdCreateStatic(ch.idle_thread_wa, sizeof(ch.idle_thread_wa),
- IDLEPRIO, (tfunc_t)_idle_thread, NULL);
+ thread_t *tp = chThdCreateStatic(ch.idle_thread_wa,
+ sizeof(ch.idle_thread_wa),
+ IDLEPRIO,
+ (tfunc_t)_idle_thread,
+ NULL);
+ chRegSetThreadNameX(tp, "idle");
+ }
#endif
}