]> Zhao Yanbai Git Server - minix.git/commitdiff
<sys/poll.h>
authorBen Gras <ben@minix3.org>
Fri, 13 Dec 2013 10:58:44 +0000 (11:58 +0100)
committerLionel Sambuc <lionel@minix3.org>
Mon, 3 Mar 2014 19:47:06 +0000 (20:47 +0100)
Change-Id: I8758d224115bdd1344cd00da6e636c529b1c191e

sys/sys/poll.h

index e429710e918d758c4f5f2595cef3c679b158c862..8267c008de1ba175dc0b78de30c04c9c83561e75 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _NBCOMPAT_POLL_H_
-#define        _NBCOMPAT_POLL_H_
+#ifndef _SYS_POLL_H_
+#define        _SYS_POLL_H_
 
-typedef unsigned int   nfds_t;
+#include <sys/featuretest.h>
 
-#define INFTIM -1
+typedef unsigned int   nfds_t;
 
 struct pollfd {
        int     fd;             /* file descriptor */
@@ -60,8 +60,42 @@ struct pollfd {
 #define        POLLHUP         0x0010
 #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
 int    poll(struct pollfd *, nfds_t, int);
 __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_ */