From 1ac9219148610878491a20d15c87476451941eee Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 15 May 2012 00:45:14 +0000 Subject: 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 --- NxWidgets/nxwm/include/cnxconsole.hxx | 15 +++++++++++---- NxWidgets/nxwm/include/nxwmconfig.hxx | 11 +++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'NxWidgets/nxwm/include') 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,13 +83,20 @@ 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: * @@ -90,6 +91,16 @@ # warning "NxConsole support may be needed (CONFIG_NXCONSOLE)" #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 */ -- cgit v1.2.3