Fix condition logic: The setup seems to support a network without sockets. That is not the case.

Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
This commit is contained in:
Gregory Nutt
2019-02-11 15:47:25 -06:00
parent 0cb1c2c0b6
commit efe65749ce
50 changed files with 58 additions and 148 deletions
+1 -1
View File
@@ -789,7 +789,7 @@ int file_dup(FAR struct file *filep, int minfd);
*
****************************************************************************/
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
int fs_dupfd2(int fd1, int fd2);
#else
# define fs_dupfd2(fd1, fd2) dup2(fd1, fd2)
+1 -1
View File
@@ -227,7 +227,7 @@ struct socket
/* This defines a list of sockets indexed by the socket descriptor */
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
struct socketlist
{
sem_t sl_sem; /* Manage access to the socket list */
+1 -1
View File
@@ -230,7 +230,7 @@ struct net_driver_s
* Must be the first field in the structure due to blink type casting.
*/
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
FAR struct net_driver_s *flink;
/* This is the name of network device assigned when netdev_register was called.
+3 -3
View File
@@ -544,7 +544,7 @@ struct task_group_s
#endif
#endif
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
/* Sockets ********************************************************************/
struct socketlist tg_socketlist; /* Maps socket descriptor to socket */
@@ -826,9 +826,9 @@ FAR struct filelist *sched_getfiles(void);
FAR struct streamlist *sched_getstreams(void);
#endif /* CONFIG_NFILE_STREAMS */
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
FAR struct socketlist *sched_getsockets(void);
#endif /* CONFIG_NSOCKET_DESCRIPTORS */
#endif
/********************************************************************************
* Name: nxtask_starthook
-2
View File
@@ -45,7 +45,6 @@
#include <nuttx/config.h>
#include <nuttx/fs/ioctl.h>
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
/* Include network IOCTL definitions */
@@ -77,7 +76,6 @@
# include <nuttx/wireless/ieee802154/ieee802154_mac.h>
#endif /* CONFIG_WIRELESS_IEEE802154 */
#endif /* CONFIG_NSOCKET_DESCRIPTORS > 0 */
/****************************************************************************
* Pre-processor Definitions
+1 -6
View File
@@ -270,11 +270,6 @@
* enabled.
*/
#ifndef CONFIG_NET
# undef CONFIG_NSOCKET_DESCRIPTORS
# define CONFIG_NSOCKET_DESCRIPTORS 0
#endif
#define SYS_close (__SYS_descriptors + 0)
#ifdef CONFIG_LIBC_IOCTL_VARIADIC
@@ -524,7 +519,7 @@
/* The following are defined only if networking AND sockets are supported */
#if CONFIG_NSOCKET_DESCRIPTORS > 0
#ifdef CONFIG_NET
# define SYS_accept (__SYS_network + 0)
# define SYS_bind (__SYS_network + 1)
# define SYS_connect (__SYS_network + 2)