Commit 26ee92ea authored by Davide Libenzi's avatar Davide Libenzi Committed by Linus Torvalds

[PATCH] epoll bits 0.34

 - Some constant adjusted
 - Comments added
 - Better hash initialization
 - Correct timeout setup
 - Added __KERNEL__ bypass to avoid userspace inclusion problems
 - Cleaned up locking
 - Function poll_init_wait() now calls poll_init_wait_ex()
 - Event return fix ( Jay Vosburgh )
 - Use <linux/hash.h> for the hash
parent aeb673ca
This diff is collapsed.
......@@ -14,10 +14,6 @@
#ifndef _LINUX_EVENTPOLL_H
#define _LINUX_EVENTPOLL_H
/* Forward declarations to avoid compiler errors */
struct file;
struct pollfd;
/* Valid opcodes to issue to sys_epoll_ctl() */
#define EP_CTL_ADD 1
......@@ -25,6 +21,13 @@ struct pollfd;
#define EP_CTL_MOD 3
#ifdef __KERNEL__
/* Forward declarations to avoid compiler errors */
struct file;
struct pollfd;
/* Kernel space functions implementing the user space "epoll" API */
asmlinkage int sys_epoll_create(int size);
asmlinkage int sys_epoll_ctl(int epfd, int op, int fd, unsigned int events);
......@@ -34,6 +37,7 @@ asmlinkage int sys_epoll_wait(int epfd, struct pollfd *events, int maxevents,
/* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */
void ep_notify_file_close(struct file *file);
#endif /* #ifdef __KERNEL__ */
#endif
#endif /* #ifndef _LINUX_EVENTPOLL_H */
......@@ -28,15 +28,6 @@ static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres
__pollwait(filp, wait_address, p);
}
static inline void poll_initwait(poll_table* pt)
{
pt->queue = 1;
pt->qproc = NULL;
pt->priv = NULL;
pt->error = 0;
pt->table = NULL;
}
static inline void poll_initwait_ex(poll_table* pt, int queue,
void (*qproc)(void *, wait_queue_head_t *),
void *priv)
......@@ -48,6 +39,12 @@ static inline void poll_initwait_ex(poll_table* pt, int queue,
pt->table = NULL;
}
static inline void poll_initwait(poll_table* pt)
{
poll_initwait_ex(pt, 1, NULL, NULL);
}
extern void poll_freewait(poll_table* pt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment