diff --git a/apps/include/netutils/telnetd.h b/apps/include/netutils/telnetd.h index f875a5edc9..4cddd92ddd 100644 --- a/apps/include/netutils/telnetd.h +++ b/apps/include/netutils/telnetd.h @@ -47,9 +47,6 @@ ****************************************************************************/ /* CONFIG_TELNETD_CONSOLE - Use the first telnet session as the default * console. - * CONFIG_TELNETD_NPOLLWAITERS - If the poll method is enabled, then this - * value will defined the maximum number of threads that can be waiting - * for events. Default: 1 * CONFIG_TELNETD_RXBUFFER_SIZE - The size of the telnet receive buffer. * Default: 256 bytes. * CONFIG_TELNETD_TXBUFFER_SIZE - The size of the telnet transmit buffer. @@ -57,12 +54,6 @@ * CONFIG_TELNETD_DUMPBUFFER - dumping of all input/output buffers. */ -#ifndef CONFIG_TELNETD_NPOLLWAITERS -# define CONFIG_TELNETD_NPOLLWAITERS 1 -#endif - -/* Configurable settings */ - #ifndef CONFIG_TELNETD_RXBUFFER_SIZE # define CONFIG_TELNETD_RXBUFFER_SIZE 256 #endif diff --git a/apps/netutils/telnetd/telnetd_driver.c b/apps/netutils/telnetd/telnetd_driver.c index 1950c881be..56a98a2f62 100644 --- a/apps/netutils/telnetd/telnetd_driver.c +++ b/apps/netutils/telnetd/telnetd_driver.c @@ -122,13 +122,14 @@ static inline void telnetd_dumpbuffer(FAR const char *msg, #else # define telnetd_dumpbuffer(msg,buffer,nbytes) #endif -static void telnetd_getchar(struct telnetd_dev_s *priv, uint8_t ch, +static void telnetd_getchar(FAR struct telnetd_dev_s *priv, uint8_t ch, FAR char *dest, int *nread); -static ssize_t telnetd_receive(struct telnetd_dev_s *priv, FAR const char *src, - size_t srclen, FAR char *dest, size_t destlen); -static bool telnetd_putchar(struct telnetd_dev_s *priv, uint8_t ch, +static ssize_t telnetd_receive(FAR struct telnetd_dev_s *priv, + FAR const char *src, size_t srclen, FAR char *dest, + size_t destlen); +static bool telnetd_putchar(FAR struct telnetd_dev_s *priv, uint8_t ch, int *nwritten); -static void telnetd_sendopt(struct telnetd_dev_s *priv, uint8_t option, +static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, uint8_t value); /* Character driver methods */ @@ -190,7 +191,7 @@ static inline void telnetd_dumpbuffer(FAR const char *msg, * ****************************************************************************/ -static void telnetd_getchar(struct telnetd_dev_s *priv, uint8_t ch, +static void telnetd_getchar(FAR struct telnetd_dev_s *priv, uint8_t ch, FAR char *dest, int *nread) { register int index; @@ -215,7 +216,7 @@ static void telnetd_getchar(struct telnetd_dev_s *priv, uint8_t ch, * ****************************************************************************/ -static ssize_t telnetd_receive(struct telnetd_dev_s *priv, FAR const char *src, +static ssize_t telnetd_receive(FAR struct telnetd_dev_s *priv, FAR const char *src, size_t srclen, FAR char *dest, size_t destlen) { int nread; @@ -336,7 +337,7 @@ static ssize_t telnetd_receive(struct telnetd_dev_s *priv, FAR const char *src, * ****************************************************************************/ -static bool telnetd_putchar(struct telnetd_dev_s *priv, uint8_t ch, +static bool telnetd_putchar(FAR struct telnetd_dev_s *priv, uint8_t ch, int *nread) { register int index; @@ -379,7 +380,7 @@ static bool telnetd_putchar(struct telnetd_dev_s *priv, uint8_t ch, * ****************************************************************************/ -static void telnetd_sendopt(struct telnetd_dev_s *priv, uint8_t option, +static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, uint8_t value) { uint8_t optbuf[4]; diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 5e4b902b5e..e60b6689a8 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2416,3 +2416,9 @@ This upsets C++ if usb.h is included. 'class' -> 'classid' in this header file and all places that referenced 'class' * drivers/usbdev/usbmsc.c: Fixed some backward conditional compilation. + * sched/on_exit.c: Add support for the on_exit() function., + * sched/exit.c, task_exithook.c, task_delete.c, sched_releasetcb.c: Move + the logic that closes file descriptors sooner in the task shutdown sequence. + When drivers are closed, they may need to do things that require a fully + up-and-running task. Some things cannot be done later when the task is + crippled. diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html index 09407bfb08..78f79b3829 100644 --- a/nuttx/Documentation/NuttxUserGuide.html +++ b/nuttx/Documentation/NuttxUserGuide.html @@ -478,7 +478,7 @@ VxWorks provides the following similar interface: Description: This function causes the calling task to cease to exist -- its stack and TCB will be deallocated. exit differs from _exit in that it flushes streams, closes file descriptors and will -execute any function registered with atexit(). +execute any function registered with atexit() or on_exit().

Input Parameters: