From 761f25c85781d5d03a0567d31de1f5ccae24e674 Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Thu, 6 Nov 2025 14:37:49 +0100 Subject: [PATCH] nshlib/nsh_proccmds.c: fix description for TID and switch order ID previously marked as PID was in fact TID. PID was hidden under GROUP column. This fixes the description. The order of TID, PPID, PID is also changed to more logical TID, PID, PPID. Signed-off-by: Michal Lenc --- nshlib/nsh_proccmds.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nshlib/nsh_proccmds.c b/nshlib/nsh_proccmds.c index 389ee71db..fe9810564 100644 --- a/nshlib/nsh_proccmds.c +++ b/nshlib/nsh_proccmds.c @@ -100,7 +100,7 @@ struct nsh_taskstatus_s FAR const char *td_sigmask; /* Signal mask */ #endif FAR char *td_cmdline; /* Command line */ - int td_pid; /* Task ID */ + int td_tid; /* Task ID */ int td_ppid; /* Parent task ID */ #ifdef NSH_HAVE_CPULOAD FAR const char *td_cpuload; /* CPU load */ @@ -379,7 +379,7 @@ static int ps_record(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath, status->td_sigmask = ""; #endif status->td_cmdline = ""; - status->td_pid = atoi(entryp->d_name); + status->td_tid = atoi(entryp->d_name); status->td_ppid = INVALID_PROCESS_ID; #ifdef NSH_HAVE_CPULOAD status->td_cpuload = ""; @@ -633,7 +633,7 @@ static void ps_title(FAR struct nsh_vtbl_s *vtbl, bool heap) "%6s " #endif "%s\n" - , "PID", "PPID", "GROUP" + , "TID", "PID", "PPID" #ifdef CONFIG_SMP , "CPU" #endif @@ -679,7 +679,7 @@ static void ps_output(FAR struct nsh_vtbl_s *vtbl, bool heap, #endif nsh_output(vtbl, - "%5d %5d %5s " + "%5d %5s %5d " #ifdef CONFIG_SMP "%3s " #endif @@ -700,7 +700,7 @@ static void ps_output(FAR struct nsh_vtbl_s *vtbl, bool heap, "%5s " #endif "%s\n" - , status->td_pid, status->td_ppid, status->td_groupid + , status->td_tid, status->td_groupid, status->td_ppid #ifdef CONFIG_SMP , status->td_cpu #endif