aboutsummaryrefslogtreecommitdiffstats
path: root/os/various
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-24 14:44:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-24 14:44:50 +0000
commit6d6284c9e6d1e3d1f0083c153ee21235771e1014 (patch)
tree32ab7da6461deb5264075e4221fb1f2aa6e666a0 /os/various
parenta2072b5560adf07640b43107e00582b31658540d (diff)
downloadChibiOS-6d6284c9e6d1e3d1f0083c153ee21235771e1014.tar.gz
ChibiOS-6d6284c9e6d1e3d1f0083c153ee21235771e1014.tar.bz2
ChibiOS-6d6284c9e6d1e3d1f0083c153ee21235771e1014.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8941 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r--os/various/shell/shell_cmd.c7
1 files changed, 3 insertions, 4 deletions
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