diff options
author | Christian Pointner <equinox@mur.at> | 2013-08-22 01:24:04 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2013-08-22 01:24:04 +0000 |
commit | 36d494a643e251ac977f635af0596ee4f3f8b4ad (patch) | |
tree | 5734e3af47260a99cd79a89ba05c81f128579164 /software/mpu/usb-cdc-shell.c | |
parent | added USB CDC based shell (diff) |
also print thread names
git-svn-id: https://svn.spreadspace.org/mur.sat@836 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/mpu/usb-cdc-shell.c')
-rw-r--r-- | software/mpu/usb-cdc-shell.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/software/mpu/usb-cdc-shell.c b/software/mpu/usb-cdc-shell.c index b863b58..d15ef18 100644 --- a/software/mpu/usb-cdc-shell.c +++ b/software/mpu/usb-cdc-shell.c @@ -200,13 +200,14 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) { chprintf(chp, "Usage: threads\r\n"); return; } - chprintf(chp, " addr stack prio refs state time\r\n"); + chprintf(chp, " addr stack prio refs state time name\r\n"); tp = chRegFirstThread(); do { - chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s %lu\r\n", + chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s %8lu %s\r\n", (uint32_t)tp, (uint32_t)tp->p_ctx.r13, (uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1), - states[tp->p_state], (uint32_t)tp->p_time); + states[tp->p_state], (uint32_t)tp->p_time, + (tp->p_name == NULL) ? "-" : tp->p_name); tp = chRegNextThread(tp); } while (tp != NULL); } |