Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
poll.h File Reference
#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 []
 

Macro Definition Documentation

#define DEFAULT_POLLMASK   (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)

Definition at line 24 of file poll.h.

#define FDS_BITPERLONG   (8*sizeof(long))

Definition at line 119 of file poll.h.

#define FDS_BYTES (   nr)    (FDS_LONGS(nr)*sizeof(long))

Definition at line 121 of file poll.h.

#define FDS_LONGS (   nr)    (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG)

Definition at line 120 of file poll.h.

#define FRONTEND_STACK_ALLOC   256

Definition at line 18 of file poll.h.

#define MAX_INT64_SECONDS   (((s64)(~((u64)0)>>1)/HZ)-1)

Definition at line 154 of file poll.h.

#define MAX_STACK_ALLOC   832

Definition at line 17 of file poll.h.

#define N_INLINE_POLL_ENTRIES   (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry))

Definition at line 22 of file poll.h.

#define POLL_STACK_ALLOC   FRONTEND_STACK_ALLOC

Definition at line 20 of file poll.h.

#define SELECT_STACK_ALLOC   FRONTEND_STACK_ALLOC

Definition at line 19 of file poll.h.

#define WQUEUES_STACK_ALLOC   (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC)

Definition at line 21 of file poll.h.

Typedef Documentation

typedef void(* poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *)

Definition at line 31 of file poll.h.

Function Documentation

int core_sys_select ( int  n,
fd_set __user inp,
fd_set __user outp,
fd_set __user exp,
struct timespec end_time 
)

Definition at line 516 of file select.c.

int do_select ( int  n,
fd_set_bits fds,
struct timespec end_time 
)

Definition at line 395 of file select.c.

int do_sys_poll ( struct pollfd __user ufds,
unsigned int  nfds,
struct timespec end_time 
)

Definition at line 816 of file select.c.

void poll_freewait ( struct poll_wqueues pwq)

Definition at line 133 of file select.c.

void poll_initwait ( struct poll_wqueues pwq)

Definition at line 116 of file select.c.

int poll_schedule_timeout ( struct poll_wqueues pwq,
int  state,
ktime_t expires,
unsigned long  slack 
)

Definition at line 231 of file select.c.

int poll_select_set_timeout ( struct timespec to,
long  sec,
long  nsec 
)

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.

Definition at line 269 of file select.c.

long select_estimate_accuracy ( struct timespec tv)

Definition at line 70 of file select.c.

Variable Documentation

struct ctl_table epoll_table[]