diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-07-08 19:29:00 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-07-08 19:29:00 +0000 |
commit | d79eea31a268ce14b60b30d929b2d2c905048d98 (patch) | |
tree | baf758ae63a822fd0361d4d4c94736f51c28d57c /os/kernel/src | |
parent | 83c5424c5f6d3c970a32e6303033ff651bf0287b (diff) | |
download | ChibiOS-d79eea31a268ce14b60b30d929b2d2c905048d98.tar.gz ChibiOS-d79eea31a268ce14b60b30d929b2d2c905048d98.tar.bz2 ChibiOS-d79eea31a268ce14b60b30d929b2d2c905048d98.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3135 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src')
-rw-r--r-- | os/kernel/src/chsys.c | 3 | ||||
-rw-r--r-- | os/kernel/src/chthreads.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 6892ec73a..8d9ce4905 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -55,6 +55,7 @@ WORKING_AREA(_idle_thread_wa, PORT_IDLE_THREAD_STACK_SIZE); void _idle_thread(void *p) {
(void)p;
+ chRegSetThreadName("idle");
while (TRUE) {
port_wait_for_interrupt();
IDLE_LOOP_HOOK();
@@ -95,6 +96,8 @@ void chSysInit(void) { currp->p_state = THD_STATE_CURRENT;
chSysEnable();
+ chRegSetThreadName("main");
+
#if !CH_NO_IDLE_THREAD
/* 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
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index 7df276bea..3d64eb993 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -89,15 +89,16 @@ Thread *_thread_init(Thread *tp, tprio_t prio) { #if CH_USE_DYNAMIC
tp->p_refs = 1;
#endif
+#if CH_USE_REGISTRY
+ tp->p_name = NULL;
+ REG_INSERT(tp);
+#endif
#if CH_USE_WAITEXIT
list_init(&tp->p_waiting);
#endif
#if CH_USE_MESSAGES
queue_init(&tp->p_msgqueue);
#endif
-#if CH_USE_REGISTRY
- REG_INSERT(tp);
-#endif
#if defined(THREAD_EXT_INIT_HOOK)
THREAD_EXT_INIT_HOOK(tp);
#endif
|