summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/devpoll.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/sys/devpoll.h')
-rw-r--r--usr/src/uts/common/sys/devpoll.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/usr/src/uts/common/sys/devpoll.h b/usr/src/uts/common/sys/devpoll.h
index 36c815c69f..4e4c76d9b0 100644
--- a/usr/src/uts/common/sys/devpoll.h
+++ b/usr/src/uts/common/sys/devpoll.h
@@ -24,11 +24,13 @@
* All rights reserved.
*/
+/*
+ * Copyright (c) 2014, Joyent, Inc. All rights reserved.
+ */
+
#ifndef _SYS_DEVPOLL_H
#define _SYS_DEVPOLL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/poll_impl.h>
#include <sys/types32.h>
@@ -39,8 +41,10 @@ extern "C" {
/* /dev/poll ioctl */
#define DPIOC (0xD0 << 8)
-#define DP_POLL (DPIOC | 1) /* poll on fds in cached in /dev/poll */
+#define DP_POLL (DPIOC | 1) /* poll on fds cached via /dev/poll */
#define DP_ISPOLLED (DPIOC | 2) /* is this fd cached in /dev/poll */
+#define DP_PPOLL (DPIOC | 3) /* ppoll on fds cached via /dev/poll */
+#define DP_EPOLLCOMPAT (DPIOC | 4) /* turn on epoll compatibility */
#define DEVPOLLSIZE 1000 /* /dev/poll table size increment */
@@ -51,14 +55,21 @@ typedef struct dvpoll {
pollfd_t *dp_fds; /* pollfd array */
nfds_t dp_nfds; /* num of pollfd's in dp_fds[] */
int dp_timeout; /* time out in milisec */
+ sigset_t *dp_setp; /* sigset, if any */
} dvpoll_t;
typedef struct dvpoll32 {
caddr32_t dp_fds; /* pollfd array */
uint32_t dp_nfds; /* num of pollfd's in dp_fds[] */
int32_t dp_timeout; /* time out in milisec */
+ caddr32_t dp_setp; /* sigset, if any */
} dvpoll32_t;
+typedef struct dvpoll_epollfd {
+ pollfd_t dpep_pollfd; /* must be first member */
+ uint64_t dpep_data; /* data payload */
+} dvpoll_epollfd_t;
+
#ifdef _KERNEL
typedef struct dp_entry {
@@ -71,6 +82,7 @@ typedef struct dp_entry {
} dp_entry_t;
#define DP_WRITER_PRESENT 0x1 /* a write is in progress */
+#define DP_ISEPOLLCOMPAT 0x2 /* epoll compatibility mode */
#define DP_REFRELE(dpep) { \
mutex_enter(&(dpep)->dpe_lock); \