Linux Kernel
3.7.1
|
#include <linux/compiler.h>
#include <linux/ktime.h>
#include <linux/wait.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/sysctl.h>
#include <asm/uaccess.h>
#include <uapi/linux/poll.h>
Go to the source code of this file.
Data Structures | |
struct | poll_table_struct |
struct | poll_table_entry |
struct | poll_wqueues |
struct | fd_set_bits |
Macros | |
#define | MAX_STACK_ALLOC 832 |
#define | FRONTEND_STACK_ALLOC 256 |
#define | SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC |
#define | POLL_STACK_ALLOC FRONTEND_STACK_ALLOC |
#define | WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) |
#define | N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) |
#define | DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) |
#define | FDS_BITPERLONG (8*sizeof(long)) |
#define | FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG) |
#define | FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long)) |
#define | MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) |
Typedefs | |
typedef void(* | poll_queue_proc )(struct file *, wait_queue_head_t *, struct poll_table_struct *) |
typedef struct poll_table_struct | poll_table |
Functions | |
void | poll_initwait (struct poll_wqueues *pwq) |
void | poll_freewait (struct poll_wqueues *pwq) |
int | poll_schedule_timeout (struct poll_wqueues *pwq, int state, ktime_t *expires, unsigned long slack) |
long | select_estimate_accuracy (struct timespec *tv) |
int | do_select (int n, fd_set_bits *fds, struct timespec *end_time) |
int | do_sys_poll (struct pollfd __user *ufds, unsigned int nfds, struct timespec *end_time) |
int | core_sys_select (int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timespec *end_time) |
int | poll_select_set_timeout (struct timespec *to, long sec, long nsec) |
Variables | |
struct ctl_table | epoll_table [] |
#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) |
#define FDS_LONGS | ( | nr | ) | (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG) |
#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) |
#define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC |
#define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC |
#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) |
typedef void(* poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *) |
typedef struct poll_table_struct poll_table |
int do_select | ( | int | n, |
fd_set_bits * | fds, | ||
struct timespec * | end_time | ||
) |
void poll_freewait | ( | struct poll_wqueues * | pwq | ) |
void poll_initwait | ( | struct poll_wqueues * | pwq | ) |
poll_select_set_timeout - helper function to setup the timeout value : pointer to timespec variable for the final timeout : seconds (from user space) : nanoseconds (from user space)
Note, we do not use a timespec for the user space value here, That way we can use the function for timeval and compat interfaces as well.
Returns -EINVAL if sec/nsec are not normalized. Otherwise 0.