Add nx_start() to simplify starting the NX server from within the RTOS

This commit is contained in:
Gregory Nutt
2013-12-29 11:11:48 -06:00
parent 6eb5386b6f
commit 5c7a4896cc
6 changed files with 300 additions and 6 deletions
+29
View File
@@ -269,6 +269,35 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev);
# define nx_run(dev) nx_runinstance(NX_DEFAULT_SERVER_MQNAME, dev)
#endif
/****************************************************************************
* Name: nx_start
*
* Description:
* nx_start() provides a wrapper function to simplify and standardize the
* starting of the NX server.
*
* NOTE: Currently, many applications include logic to start the NX
* server from application initialization logic. That, of course, cannot
* work in the NuttX kernel build because the resources required by the
* NX server are private to the kernel mode logic.
*
* Input Parameters:
* None
*
* Returned Value:
* Zero (OK) is returned on success. This indicates that the NX server
* has been successfully started, is running, and waiting to accept
* connections from NX clients.
*
* A negated errno value is returned on failure. The errno value indicates
* the nature of the failure.
*
****************************************************************************/
#if defined(CONFIG_NX_MULTIUSER) && defined(CONFIG_NX_START)
int nx_start(void);
#endif
/****************************************************************************
* Name:nx_connectinstance (and nx_connect macro)
*