diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-15 00:45:14 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-15 00:45:14 +0000 |
commit | 1ac9219148610878491a20d15c87476451941eee (patch) | |
tree | 4692ee907021a755c1a5f3db5fd13e0d9712a2f7 /NxWidgets/nxwm/include | |
parent | 5d5fb0b5646aed4cb074eb317fc09170645c7a3f (diff) | |
download | nuttx-1ac9219148610878491a20d15c87476451941eee.tar.gz nuttx-1ac9219148610878491a20d15c87476451941eee.tar.bz2 nuttx-1ac9219148610878491a20d15c87476451941eee.zip |
Fix several compiler errors that occur when CONFIG_SCHED_ONEXIT is enabled; on_exit is now used in NxWM::NxConsole to close the window with the NSH session exits
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4738 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r-- | NxWidgets/nxwm/include/cnxconsole.hxx | 15 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmconfig.hxx | 11 |
2 files changed, 22 insertions, 4 deletions
diff --git a/NxWidgets/nxwm/include/cnxconsole.hxx b/NxWidgets/nxwm/include/cnxconsole.hxx index 426cf165f..91fb941d8 100644 --- a/NxWidgets/nxwm/include/cnxconsole.hxx +++ b/NxWidgets/nxwm/include/cnxconsole.hxx @@ -83,14 +83,21 @@ namespace NxWM NXCONSOLE m_nxcon; /**< NxConsole handle */ pid_t m_pid; /**< Task ID of the NxConsole thread */ - /** - * This is the NxConsole task. This function first redirects output to the - * console window. - */ + /** + * This is the NxConsole task. This function first redirects output to the + * console window then calls to start the NSH logic. + */ static int nxconsole(int argc, char *argv[]); /** + * This is the NxConsole task exit handler. It is registered with on_exit() + * and called automatically when the nxconsole task exits. + */ + + static void exitHandler(int code, FAR void *arg); + + /** * Called when the window minimize button is pressed. */ diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index 88c2ea8db..34721d777 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -58,6 +58,7 @@ * CONFIG_NX : NX must enabled * CONFIG_NX_MULTIUSER=y : NX must be configured in multiuse mode * CONFIG_NXCONSOLE=y : For NxConsole support + * CONFIG_SCHED_ONEXIT : Support for on_exit() * * General settings: * @@ -91,6 +92,16 @@ #endif /** + * on_exit() support is (probably) required. on_exit() is the normal + * mechanism used by NxWM applications to clean-up on a application task + * exit. + */ + +#ifndef CONFIG_SCHED_ONEXIT +# warning "on_exit() support may be needed (CONFIG_SCHED_ONEXIT)" +#endif + +/** * Default font ID */ |