Poll API may be disabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1259 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
dbda581f26
commit
72d4fbf168
@ -5772,7 +5772,7 @@ interface of the same name.
|
|||||||
<li><a href="#unsetenv">2.10.5 <code>unsetenv</code></a></li>
|
<li><a href="#unsetenv">2.10.5 <code>unsetenv</code></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><b>Disabling Environment Variable Support</b>.
|
<p><b>Disabling Environment Variable Support</b>.
|
||||||
All support for environment variables can be disabled by setting <code>CONFIG_DISABLE_ENVIRONMENT</code>
|
All support for environment variables can be disabled by setting <code>CONFIG_DISABLE_ENVIRON</code>
|
||||||
in the board configuration file.
|
in the board configuration file.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ defconfig -- This is a configuration file similar to the Linux
|
|||||||
|
|
||||||
CONFIG_DISABLE_CLOCK, CONFIG_DISABLE_POSIX_TIMERS, CONFIG_DISABLE_PTHREAD.
|
CONFIG_DISABLE_CLOCK, CONFIG_DISABLE_POSIX_TIMERS, CONFIG_DISABLE_PTHREAD.
|
||||||
CONFIG_DISABLE_SIGNALS, CONFIG_DISABLE_MQUEUE, CONFIG_DISABLE_MOUNTPOUNT,
|
CONFIG_DISABLE_SIGNALS, CONFIG_DISABLE_MQUEUE, CONFIG_DISABLE_MOUNTPOUNT,
|
||||||
CONFIG_DISABLE_ENVIRON
|
CONFIG_DISABLE_ENVIRON, CONFIG_DISABLE_POLL
|
||||||
|
|
||||||
|
|
||||||
Misc libc settings
|
Misc libc settings
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
|
|
||||||
#include "fs_internal.h"
|
#include "fs_internal.h"
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_POLL
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -313,3 +315,5 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_DISABLE_POLL */
|
||||||
|
|
||||||
|
@ -75,7 +75,9 @@ struct file_operations
|
|||||||
ssize_t (*write)(FAR struct file *filp, FAR const char *buffer, size_t buflen);
|
ssize_t (*write)(FAR struct file *filp, FAR const char *buffer, size_t buflen);
|
||||||
off_t (*seek)(FAR struct file *filp, off_t offset, int whence);
|
off_t (*seek)(FAR struct file *filp, off_t offset, int whence);
|
||||||
int (*ioctl)(FAR struct file *filp, int cmd, unsigned long arg);
|
int (*ioctl)(FAR struct file *filp, int cmd, unsigned long arg);
|
||||||
int (*poll)(FAR struct file *filp, struct pollfd *poll);
|
#ifndef CONFIG_DISABLE_POLL
|
||||||
|
int (*poll)(FAR struct file *filp, struct pollfd *fds);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The two structures need not be common after this point */
|
/* The two structures need not be common after this point */
|
||||||
};
|
};
|
||||||
|
@ -158,8 +158,10 @@ EXTERN int netdev_ioctl(int sockfd, int cmd, struct ifreq *req);
|
|||||||
* to this function.
|
* to this function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_POLL
|
||||||
struct pollfd; /* Forward reference -- see poll.h */
|
struct pollfd; /* Forward reference -- see poll.h */
|
||||||
EXTERN int net_poll(int sockfd, struct pollfd *fds);
|
EXTERN int net_poll(int sockfd, struct pollfd *fds);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* netdev-register.c *********************************************************/
|
/* netdev-register.c *********************************************************/
|
||||||
/* This function is called by network interface device drivers to inform the
|
/* This function is called by network interface device drivers to inform the
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#ifdef CONFIG_NET
|
#if defined(CONFIG_NET) && !defined(CONFIG_DISABLE_POLL)
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -77,4 +77,4 @@ int net_poll(int sockfd, struct pollfd *fds)
|
|||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NET */
|
#endif /* CONFIG_NET&& !CONFIG_DISABLE_POLL */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user