From 36d494a643e251ac977f635af0596ee4f3f8b4ad Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 22 Aug 2013 01:24:04 +0000 Subject: also print thread names git-svn-id: https://svn.spreadspace.org/mur.sat@836 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/mpu/usb-cdc-shell.c | 7 ++++--- 1 file 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); } -- cgit v1.2.3