You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/07/26 18:43:33 UTC

[incubator-nuttx-apps] branch master updated: nshlib/ps: update config MM_BACKTRACE to int type

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new ab43c625d nshlib/ps: update config MM_BACKTRACE to int type
ab43c625d is described below

commit ab43c625d18b283336ea91ae857b0b208a34f365
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Mon Jul 4 16:31:39 2022 +0800

    nshlib/ps: update config MM_BACKTRACE to int type
    
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 nshlib/nsh_proccmds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nshlib/nsh_proccmds.c b/nshlib/nsh_proccmds.c
index 5bfbe4c27..b8f7aa716 100644
--- a/nshlib/nsh_proccmds.c
+++ b/nshlib/nsh_proccmds.c
@@ -92,7 +92,7 @@ static const char g_priority[]  = "Priority:";
 static const char g_scheduler[] = "Scheduler:";
 static const char g_sigmask[]   = "SigMask:";
 
-#if defined(CONFIG_MM_BACKTRACE) && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
+#if CONFIG_MM_BACKTRACE >= 0 && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
 static const char g_heapsize[]  = "AllocSize:";
 #endif /* CONFIG_DEBUG _MM && !CONFIG_NSH_DISABLE_PSHEAPUSAGE */
 
@@ -232,7 +232,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
   FAR char *nextline;
   int ret;
   int i;
-#if defined(CONFIG_MM_BACKTRACE) && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
+#if CONFIG_MM_BACKTRACE >= 0 && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
   unsigned long heap_size = 0;
 #endif
 #if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
@@ -340,7 +340,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
              status.td_flags, status.td_state, status.td_event);
   nsh_output(vtbl, "%-8s ", status.td_sigmask);
 
-#if defined(CONFIG_MM_BACKTRACE) && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
+#if CONFIG_MM_BACKTRACE >= 0 && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
   /* Get the Heap AllocSize */
 
   filepath  = NULL;
@@ -579,7 +579,7 @@ int cmd_ps(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
              "PRI", "POLICY", "TYPE", "NPX", "STATE", "EVENT");
   nsh_output(vtbl, "%-8s ", "SIGMASK");
 
-#if defined(CONFIG_MM_BACKTRACE) && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
+#if CONFIG_MM_BACKTRACE >= 0 && !defined(CONFIG_NSH_DISABLE_PSHEAPUSAGE)
   nsh_output(vtbl, "%8s ", "HEAP");
 #endif