From 8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 21 Feb 2016 10:45:42 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8919 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/various/lwip_bindings/arch/sys_arch.c | 26 ++------------------------ os/various/shell/shell.c | 1 - os/various/shell/shell_cmd.c | 3 ++- 3 files changed, 4 insertions(+), 26 deletions(-) (limited to 'os/various') diff --git a/os/various/lwip_bindings/arch/sys_arch.c b/os/various/lwip_bindings/arch/sys_arch.c index 950213ef1..40577f2bc 100644 --- a/os/various/lwip_bindings/arch/sys_arch.c +++ b/os/various/lwip_bindings/arch/sys_arch.c @@ -204,32 +204,10 @@ void sys_mbox_set_invalid(sys_mbox_t *mbox) { sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio) { - size_t wsz; - void *wsp; - syssts_t sts; thread_t *tp; - (void)name; - wsz = THD_WORKING_AREA_SIZE(stacksize); - wsp = chCoreAlloc(wsz); - if (wsp == NULL) - return NULL; - -#if CH_DBG_FILL_THREADS == TRUE - _thread_memfill((uint8_t *)wsp, - (uint8_t *)wsp + sizeof(thread_t), - CH_DBG_THREAD_FILL_VALUE); - _thread_memfill((uint8_t *)wsp + sizeof(thread_t), - (uint8_t *)wsp + wsz, - CH_DBG_STACK_FILL_VALUE); -#endif - - sts = chSysGetStatusAndLockX(); - tp = chThdCreateI(wsp, wsz, prio, (tfunc_t)thread, arg); - chRegSetThreadNameX(tp, name); - chThdStartI(tp); - chSysRestoreStatusX(sts); - + tp = chThdCreateFromHeap(NULL, THD_WORKING_AREA_SIZE(stacksize), + name, prio, (tfunc_t)thread, arg); return (sys_thread_t)tp; } diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c index 958afcaf1..0cbaedc81 100644 --- a/os/various/shell/shell.c +++ b/os/various/shell/shell.c @@ -130,7 +130,6 @@ THD_FUNCTION(shellThread, p) { char *lp, *cmd, *tokp, line[SHELL_MAX_LINE_LENGTH]; char *args[SHELL_MAX_ARGUMENTS + 1]; - chRegSetThreadName("shell"); chprintf(chp, "\r\nChibiOS/RT Shell\r\n"); while (true) { chprintf(chp, "ch> "); diff --git a/os/various/shell/shell_cmd.c b/os/various/shell/shell_cmd.c index 7d592286b..6432f59d3 100644 --- a/os/various/shell/shell_cmd.c +++ b/os/various/shell/shell_cmd.c @@ -165,7 +165,8 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) { chprintf(chp, "Usage: test\r\n"); return; } - tp = chThdCreateFromHeap(NULL, SHELL_CMD_TEST_WA_SIZE, chThdGetPriorityX(), + tp = chThdCreateFromHeap(NULL, SHELL_CMD_TEST_WA_SIZE, + "test", chThdGetPriorityX(), TestThread, chp); if (tp == NULL) { chprintf(chp, "out of memory\r\n"); -- cgit v1.2.3