summaryrefslogtreecommitdiffstats
path: root/private/inc/sys/poll.h
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/inc/sys/poll.h
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/inc/sys/poll.h')
-rw-r--r--private/inc/sys/poll.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/private/inc/sys/poll.h b/private/inc/sys/poll.h
new file mode 100644
index 000000000..e2599db6c
--- /dev/null
+++ b/private/inc/sys/poll.h
@@ -0,0 +1,75 @@
+/*++
+
+Copyright (c) 1991 Microsoft Corporation
+
+Module Name:
+
+ poll.h
+
+Abstract:
+
+ Contains #defines, types, and macros for poll
+
+Author:
+
+ Sam Patton (sampa) July 26, 1991
+
+Revision History:
+
+--*/
+
+#ifndef SYS_POLL_INCLUDED
+#define SYS_POLL_INCLUDED
+
+/*
+ * Structure of file descriptor/event pairs supplied in
+ * the poll arrays.
+ */
+struct pollfd {
+#ifndef _POSIX_SOURCE
+ HANDLE fd; /* file handle to poll */
+#else
+ int fd; /* file desc to poll */
+#endif
+ short events; /* events of interest on fd */
+ short revents; /* events that occurred on fd */
+};
+
+/*
+ * Testable select events
+ */
+#define POLLIN 01 /* fd is readable */
+#define POLLPRI 02 /* priority info at fd */
+#define POLLOUT 04 /* fd is writeable (won't block) */
+#define POLLMSG 0100 /* M_SIG or M_PCSIG arrived */
+
+/*
+ * Non-testable poll events (may not be specified in events field,
+ * but may be returned in revents field).
+ */
+#define POLLERR 010 /* fd has error condition */
+#define POLLHUP 020 /* fd has been hung up on */
+#define POLLNVAL 040 /* invalid pollfd entry */
+
+/*
+ * Number of pollfd entries to read in at a time in poll.
+ * The larger the value the better the performance, up to the
+ * maximum number of open files allowed. Large numbers will
+ * use excessive amounts of kernel stack space.
+ */
+#define NPOLLFILE 20
+
+
+/*
+ * Poll function prototype
+ *
+ */
+
+int
+poll(
+ IN OUT struct pollfd *,
+ IN unsigned int,
+ IN int);
+
+
+#endif //SYS_POLL_INCLUDED