From 6d6284c9e6d1e3d1f0083c153ee21235771e1014 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 24 Feb 2016 14:44:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8941 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/various/shell/shell_cmd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'os/various/shell/shell_cmd.c') diff --git a/os/various/shell/shell_cmd.c b/os/various/shell/shell_cmd.c index 80d683583..f8a8a0c06 100644 --- a/os/various/shell/shell_cmd.c +++ b/os/various/shell/shell_cmd.c @@ -144,12 +144,12 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) { chprintf(chp, "Usage: threads\r\n"); return; } - chprintf(chp, "stklimit stack addr prio state name\r\n"); + chprintf(chp, "stklimit stack addr refs prio state name\r\n"); tp = chRegFirstThread(); do { - chprintf(chp, "%08lx %08lx %08lx %4lu %9s %12s\r\n", + chprintf(chp, "%08lx %08lx %08lx %4lu %4lu %9s %12s\r\n", (uint32_t)tp->stklimit, (uint32_t)tp->ctx.sp, (uint32_t)tp, - (uint32_t)tp->prio, states[tp->state], + (uint32_t)tp->refs - 1, (uint32_t)tp->prio, states[tp->state], tp->name == NULL ? "" : tp->name); tp = chRegNextThread(tp); } while (tp != NULL); @@ -173,7 +173,6 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) { return; } chThdWait(tp); - chThdFreeToHeap(tp); } #endif -- cgit v1.2.3