aboutsummaryrefslogtreecommitdiffstats
path: root/os/various
diff options
context:
space:
mode:
Diffstat (limited to 'os/various')
-rw-r--r--os/various/lwip_bindings/arch/sys_arch.c26
-rw-r--r--os/various/shell/shell.c1
-rw-r--r--os/various/shell/shell_cmd.c3
3 files changed, 4 insertions, 26 deletions
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");