diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-02 12:35:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-02 12:35:30 +0000 |
commit | e2ce5d030925d1dd181d873b9f8a96ba5661a177 (patch) | |
tree | 41be2c630836828804f1ae8fa7ea9cacee77e6c5 /nuttx/examples/nsh/nsh.h | |
parent | 16fdd6a9d18d44d4915b5285718c7a127090cf86 (diff) | |
download | px4-nuttx-e2ce5d030925d1dd181d873b9f8a96ba5661a177.tar.gz px4-nuttx-e2ce5d030925d1dd181d873b9f8a96ba5661a177.tar.bz2 px4-nuttx-e2ce5d030925d1dd181d873b9f8a96ba5661a177.zip |
Add option to disable background commands
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@865 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/nsh.h')
-rw-r--r-- | nuttx/examples/nsh/nsh.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/nuttx/examples/nsh/nsh.h b/nuttx/examples/nsh/nsh.h index 7afade195..9203d7c0f 100644 --- a/nuttx/examples/nsh/nsh.h +++ b/nuttx/examples/nsh/nsh.h @@ -49,10 +49,13 @@ * Definitions ****************************************************************************/ -/* The telnetd interface requires pthread support */ +/* The telnetd interface and background commands require pthread support */ #ifdef CONFIG_DISABLE_PTHREAD # undef CONFIG_EXAMPLES_NSH_TELNET +# ifndef CONFIG_EXAMPLES_NSH_DISABLEBG +# define CONFIG_EXAMPLES_NSH_DISABLEBG 1 +# endif #endif /* One front end must be defined */ @@ -114,6 +117,8 @@ # define CONFIG_LIB_HOMEDIR "/" #endif +/* Method access macros */ + #define nsh_clone(v) (v)->clone(v) #define nsh_release(v) (v)->release(v) #define nsh_linebuffer(v) (v)->linebuffer(v) @@ -127,6 +132,8 @@ # define nsh_output vtbl->output #endif +/* Size of info to be saved in call to nsh_redirect */ + #define SAVE_SIZE (sizeof(int) + sizeof(FILE*) + sizeof(boolean)) /* Stubs used when working directory is not supported */ @@ -158,7 +165,7 @@ struct nsh_state_s struct nsh_parser_s { -#ifndef CONFIG_DISABLE_PTHREAD +#ifndef CONFIG_EXAMPLES_NSH_DISABLEBG boolean np_bg; /* TRUE: The last command executed in background */ #endif boolean np_redirect; /* TRUE: Output from the last command was re-directed */ @@ -166,7 +173,7 @@ struct nsh_parser_s #ifndef CONFIG_EXAMPLES_NSH_DISABLESCRIPT ubyte np_ndx; /* Current index into np_st[] */ #endif -#ifndef CONFIG_DISABLE_PTHREAD +#ifndef CONFIG_EXAMPLES_NSH_DISABLEBG int np_nice; /* "nice" value applied to last background cmd */ #endif @@ -187,7 +194,7 @@ struct nsh_vtbl_s * of the front end. */ -#ifndef CONFIG_DISABLE_PTHREAD +#ifndef CONFIG_EXAMPLES_NSH_DISABLEBG FAR struct nsh_vtbl_s *(*clone)(FAR struct nsh_vtbl_s *vtbl); void (*addref)(FAR struct nsh_vtbl_s *vtbl); void (*release)(FAR struct nsh_vtbl_s *vtbl); |