<sys/poll.h>
Change-Id: I8758d224115bdd1344cd00da6e636c529b1c191e
This commit is contained in:
parent
aae07bc777
commit
7435a20c91
1 changed files with 39 additions and 5 deletions
|
@ -29,13 +29,13 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NBCOMPAT_POLL_H_
|
#ifndef _SYS_POLL_H_
|
||||||
#define _NBCOMPAT_POLL_H_
|
#define _SYS_POLL_H_
|
||||||
|
|
||||||
|
#include <sys/featuretest.h>
|
||||||
|
|
||||||
typedef unsigned int nfds_t;
|
typedef unsigned int nfds_t;
|
||||||
|
|
||||||
#define INFTIM -1
|
|
||||||
|
|
||||||
struct pollfd {
|
struct pollfd {
|
||||||
int fd; /* file descriptor */
|
int fd; /* file descriptor */
|
||||||
short events; /* events to look for */
|
short events; /* events to look for */
|
||||||
|
@ -60,8 +60,42 @@ struct pollfd {
|
||||||
#define POLLHUP 0x0010
|
#define POLLHUP 0x0010
|
||||||
#define POLLNVAL 0x0020
|
#define POLLNVAL 0x0020
|
||||||
|
|
||||||
|
#if defined(_NETBSD_SOURCE)
|
||||||
|
/*
|
||||||
|
* Infinite timeout value.
|
||||||
|
*/
|
||||||
|
#define INFTIM -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _KERNEL
|
||||||
|
#include <sys/signal.h> /* for sigset_t */
|
||||||
|
|
||||||
|
struct lwp;
|
||||||
|
struct timespec;
|
||||||
|
|
||||||
|
int pollcommon(register_t *, struct pollfd *, u_int,
|
||||||
|
struct timespec *, sigset_t *);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int poll(struct pollfd *, nfds_t, int);
|
int poll(struct pollfd *, nfds_t, int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_NBCOMPAT_POLL_H_ */
|
#ifdef _NETBSD_SOURCE
|
||||||
|
#include <sys/sigtypes.h> /* for sigset_t */
|
||||||
|
struct timespec;
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
#ifndef __LIBC12_SOURCE__
|
||||||
|
int pollts(struct pollfd * __restrict, nfds_t,
|
||||||
|
const struct timespec * __restrict, const sigset_t * __restrict)
|
||||||
|
__RENAME(__pollts50);
|
||||||
|
#endif /* __LIBC12_SOURCE__ */
|
||||||
|
__END_DECLS
|
||||||
|
#endif /* _NETBSD_SOURCE */
|
||||||
|
|
||||||
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
|
#endif /* !_SYS_POLL_H_ */
|
||||||
|
|
Loading…
Reference in a new issue