Revert "Review of last PR"

This reverts commit 0e4c247e1d.
This commit is contained in:
Gregory Nutt 2016-07-01 13:26:34 -06:00
parent 0e4c247e1d
commit 57a0f88728
2 changed files with 7 additions and 4 deletions

View File

@ -405,7 +405,7 @@ config NSH_DISABLE_PS
config NSH_DISABLE_PSSTACKUSAGE config NSH_DISABLE_PSSTACKUSAGE
bool "Disable ps stack usage" bool "Disable ps stack usage"
depends on STACK_COLORATION && !NSH_DISABLE_PS depends on !NSH_DISABLE_PS
default n default n
---help--- ---help---
Disable to save space and not pull in floating point routines Disable to save space and not pull in floating point routines

View File

@ -71,6 +71,9 @@
# undef HAVE_GROUPID # undef HAVE_GROUPID
#endif #endif
#if defined(CONFIG_STACK_COLORATION) && !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
# define PS_HAVE_STACKUSAGE
#endif
/**************************************************************************** /****************************************************************************
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
@ -266,7 +269,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
FAR char *nextline; FAR char *nextline;
int ret; int ret;
int i; int i;
#ifndef CONFIG_NSH_DISABLE_PSSTACKUSAGE #ifdef PS_HAVE_STACKUSAGE
int stack_size; int stack_size;
int stack_used; int stack_used;
float stack_filled; float stack_filled;
@ -387,7 +390,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
nsh_output(vtbl, "%-8s ", status.td_sigmask); nsh_output(vtbl, "%-8s ", status.td_sigmask);
#endif #endif
#ifndef CONFIG_NSH_DISABLE_PSSTACKUSAGE #ifdef PS_HAVE_STACKUSAGE
/* Get the StackSize and StackUsed */ /* Get the StackSize and StackUsed */
stack_size = 0; stack_size = 0;
@ -567,7 +570,7 @@ int cmd_ps(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", "SIGMASK"); nsh_output(vtbl, "%-8s ", "SIGMASK");
#endif #endif
#ifndef CONFIG_NSH_DISABLE_PSSTACKUSAGE #ifdef PS_HAVE_STACKUSAGE
nsh_output(vtbl, "%6s ", "STACK"); nsh_output(vtbl, "%6s ", "STACK");
nsh_output(vtbl, "%6s ", "USED"); nsh_output(vtbl, "%6s ", "USED");
nsh_output(vtbl, "%7s ", "FILLED"); nsh_output(vtbl, "%7s ", "FILLED");