diff --git a/arch/arm/src/common/arm_assert.c b/arch/arm/src/common/arm_assert.c index f8e14b2085..0555180275 100644 --- a/arch/arm/src/common/arm_assert.c +++ b/arch/arm/src/common/arm_assert.c @@ -180,7 +180,7 @@ static void arm_dump_task(struct tcb_s *tcb, void *arg) { FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb; - snprintf(args, sizeof(args), "%p ", ptcb->arg); + snprintf(args, sizeof(args), " %p", ptcb->arg); } else #endif @@ -190,7 +190,7 @@ static void arm_dump_task(struct tcb_s *tcb, void *arg) while (*argv != NULL && npos < sizeof(args)) { - npos += snprintf(args + npos, sizeof(args) - npos, "%s ", *argv++); + npos += snprintf(args + npos, sizeof(args) - npos, " %s", *argv++); } } @@ -210,11 +210,7 @@ static void arm_dump_task(struct tcb_s *tcb, void *arg) #ifdef CONFIG_SCHED_CPULOAD " %3" PRId32 ".%01" PRId32 "%%" #endif -#if CONFIG_TASK_NAME_SIZE > 0 - " %s %s\n" -#else - " %s\n" -#endif + " %s%s\n" , tcb->pid, tcb->sched_priority #ifdef CONFIG_SMP , tcb->cpu @@ -232,6 +228,8 @@ static void arm_dump_task(struct tcb_s *tcb, void *arg) #endif #if CONFIG_TASK_NAME_SIZE > 0 , tcb->name +#else + , "" #endif , args ); diff --git a/arch/risc-v/src/common/riscv_assert.c b/arch/risc-v/src/common/riscv_assert.c index 5eecd4675a..5bd41282d3 100644 --- a/arch/risc-v/src/common/riscv_assert.c +++ b/arch/risc-v/src/common/riscv_assert.c @@ -180,7 +180,7 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg) { FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb; - snprintf(args, sizeof(args), "%p ", ptcb->arg); + snprintf(args, sizeof(args), " %p", ptcb->arg); } else #endif @@ -190,7 +190,7 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg) while (*argv != NULL && npos < sizeof(args)) { - npos += snprintf(args + npos, sizeof(args) - npos, "%s ", *argv++); + npos += snprintf(args + npos, sizeof(args) - npos, " %s", *argv++); } } @@ -210,11 +210,7 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg) #ifdef CONFIG_SCHED_CPULOAD " %3" PRId32 ".%01" PRId32 "%%" #endif -#if CONFIG_TASK_NAME_SIZE > 0 - " %s %s\n" -#else - " %s\n" -#endif + " %s%s\n" , tcb->pid, tcb->sched_priority #ifdef CONFIG_SMP , tcb->cpu @@ -232,6 +228,8 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg) #endif #if CONFIG_TASK_NAME_SIZE > 0 , tcb->name +#else + , "" #endif , args ); diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c index 811a90f593..c510652ec3 100644 --- a/arch/xtensa/src/common/xtensa_dumpstate.c +++ b/arch/xtensa/src/common/xtensa_dumpstate.c @@ -95,7 +95,7 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg) { FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb; - snprintf(args, sizeof(args), "%p ", ptcb->arg); + snprintf(args, sizeof(args), " %p", ptcb->arg); } else #endif @@ -105,7 +105,7 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg) while (*argv != NULL && npos < sizeof(args)) { - npos += snprintf(args + npos, sizeof(args) - npos, "%s ", *argv++); + npos += snprintf(args + npos, sizeof(args) - npos, " %s", *argv++); } } @@ -126,9 +126,7 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg) " %3" PRId32 ".%01" PRId32 "%%" #endif #if CONFIG_TASK_NAME_SIZE > 0 - " %s %s\n" -#else - " %s\n" + " %s%s\n" #endif , tcb->pid, tcb->sched_priority #ifdef CONFIG_SMP @@ -147,6 +145,8 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg) #endif #if CONFIG_TASK_NAME_SIZE > 0 , tcb->name +#else + , "" #endif , args );