Lines Matching full:poll
36 * Caching Poll Subsystem:
38 * Each kernel thread (1), if engaged in poll system call, has a reference to
41 * calls to poll. A bitmap (4) is stored inside the poll cache, where each
44 * examined on the next poll invocation. The pollstate_t also contains a list
60 * | /dev/poll tbl | |
77 * Both poll system call and /dev/poll use the pollcache_t structure
78 * definition and the routines managing the structure. But poll(2) and
79 * /dev/poll have their own copy of the structures. The /dev/poll driver
84 #include <sys/poll.h>
114 pollfd_t *pcs_pollfd; /* cached poll lists */
115 size_t pcs_nfds; /* number of poll fd in cached list */
122 * Maximum depth for recusive poll operations.
130 pollfd_t *ps_pollfd; /* hold the current poll list */
133 pollcache_t *ps_pcache; /* cached poll fd set */
134 pollcacheset_t *ps_pcacheset; /* cached poll lists */
135 int ps_nsets; /* no. of cached poll sets */
158 * poll cache size defines
162 #define POLLHASHINC 2 /* poll hash table growth factor */
163 #define POLLHASHTHRESHOLD 2 /* poll hash list length threshold */
164 #define POLLHASH(x, y) ((y) % (x)) /* poll hash function */
167 * poll.c assumes the POLLMAPCHUNK is power of 2
173 * poll list for quick revents update.
176 ssize_t xf_position; /* xref fd position in poll fd list */
177 short xf_refcnt; /* ref cnt of same fd in poll list */
194 * pollcaches in a recursive /dev/poll operation. Fields are protected by
211 * polldat is an entry for a cached poll fd. A polldat struct can be in
212 * poll cache table as well as on pollhead ph_list, which is used by
217 int pd_fd; /* cached poll fd */
220 pollhead_t *pd_php; /* used to undo poll registration */
226 int pd_nsets; /* num of xref sets, used by poll(2) */
244 ulong_t *pc_bitmap; /* point to poll fd bitmap */
279 * public poll head interfaces (see poll.h):
286 * private poll head interfaces:
295 * poll state interfaces:
310 * pcache_alloc allocate a poll cache skeleton
311 * pcache_create creates all poll cache supporting data struct
312 * pcache_insert cache a poll fd, calls pcache_insert_fd
354 * pcacheset_cache_list caches and polls a new poll list
355 * pcacheset_remove_list removes (usually a partial) cached poll list
360 * pcacheset_replace selects a poll cacheset for replacement