Add on_exit(); Re-order some logic in the task shutdown sequence. Sometimes some complex logic needs to execute when closing file descriptors and this needs to happen early while the task is still healthy
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4354 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
0ded9de019
commit
66d9fc6bca
@ -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
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user