Merged in david_s5/apps/upstream_to_greg (pull request #50)

Take 2
This commit is contained in:
Gregory Nutt 2016-07-01 15:57:09 -06:00
commit 3bb6a08e87
2 changed files with 5 additions and 9 deletions

View File

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

View File

@ -71,10 +71,6 @@
# undef HAVE_GROUPID
#endif
#if defined(CONFIG_STACK_COLORATION) && !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
# define PS_HAVE_STACKUSAGE
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@ -134,7 +130,7 @@ static const char g_scheduler[] = "Scheduler:";
static const char g_sigmask[] = "SigMask:";
#endif
#ifdef CONFIG_STACK_COLORATION
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
static const char g_stacksize[] = "StackSize:";
static const char g_stackused[] = "StackUsed:";
#endif
@ -270,7 +266,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
FAR char *nextline;
int ret;
int i;
#ifdef PS_HAVE_STACKUSAGE
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
int stack_size;
int stack_used;
float stack_filled;
@ -391,7 +387,7 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath,
nsh_output(vtbl, "%-8s ", status.td_sigmask);
#endif
#ifdef PS_HAVE_STACKUSAGE
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
/* Get the StackSize and StackUsed */
stack_size = 0;
@ -571,7 +567,7 @@ int cmd_ps(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#ifndef CONFIG_DISABLE_SIGNALS
nsh_output(vtbl, "%-8s ", "SIGMASK");
#endif
#ifdef PS_HAVE_STACKUSAGE
#if !defined(CONFIG_NSH_DISABLE_PSSTACKUSAGE)
nsh_output(vtbl, "%6s ", "STACK");
nsh_output(vtbl, "%6s ", "USED");
nsh_output(vtbl, "%7s ", "FILLED");