diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-14 19:12:32 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-14 19:12:32 -0800 |
| commit | 32735425e2a971851e58de4743e5c63149696763 (patch) | |
| tree | ac64f0600ded280f007503fad711751460da3fac /include | |
| parent | 26c692941cd9362f55a9a0ca71eed2381c593124 (diff) | |
| parent | 3197f4801bc4448dbfb35c30667c03fde90b824a (diff) | |
Merge bk://linux-input.bkbits.net/linux-input
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/devfs_fs_kernel.h | 11 | ||||
| -rw-r--r-- | include/linux/eventpoll.h | 3 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/poll.h | 15 |
4 files changed, 26 insertions, 7 deletions
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index a9327bb3000a..a6da1f5d84e8 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -88,7 +88,8 @@ extern void devfs_auto_unregister (devfs_handle_t master,devfs_handle_t slave); extern devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master); extern const char *devfs_get_name (devfs_handle_t de, unsigned int *namelen); extern int devfs_only (void); -extern void devfs_register_tape (devfs_handle_t de); +extern int devfs_register_tape (devfs_handle_t de); +extern void devfs_unregister_tape(int num); extern void devfs_register_series (devfs_handle_t dir, const char *format, unsigned int num_entries, unsigned int flags, unsigned int major, @@ -230,11 +231,13 @@ static inline int devfs_only (void) { return 0; } -static inline void devfs_register_tape (devfs_handle_t de) +static inline int devfs_register_tape (devfs_handle_t de) +{ + return -1; +} +static inline void devfs_unregister_tape(int num) { - return; } - static inline void devfs_register_series (devfs_handle_t dir, const char *format, unsigned int num_entries, diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 9bc6f320c3a4..f190427f1bec 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -34,6 +34,9 @@ asmlinkage int sys_epoll_ctl(int epfd, int op, int fd, unsigned int events); asmlinkage int sys_epoll_wait(int epfd, struct pollfd *events, int maxevents, int timeout); +/* Used to initialize the epoll bits inside the "struct file" */ +void ep_init_file_struct(struct file *file); + /* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */ void ep_notify_file_close(struct file *file); diff --git a/include/linux/fs.h b/include/linux/fs.h index c3bc1a4d0c32..54e7789318ec 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -506,6 +506,10 @@ struct file { /* needed for tty driver, and maybe others */ void *private_data; + + /* Used by fs/eventpoll.c to link all the hooks to this file */ + struct list_head f_ep_links; + spinlock_t f_ep_lock; }; extern spinlock_t files_lock; #define file_list_lock() spin_lock(&files_lock); diff --git a/include/linux/poll.h b/include/linux/poll.h index 416d32e5d8e2..95c12bca60ba 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -14,14 +14,17 @@ struct poll_table_page; struct poll_table_struct; typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); +typedef void (*poll_free_proc)(struct poll_table_struct *); typedef struct poll_table_struct { poll_queue_proc qproc; + poll_free_proc fproc; int error; struct poll_table_page * table; } poll_table; extern void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p); +extern void __pollfreewait(poll_table* pt); static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) { @@ -29,9 +32,10 @@ static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres p->qproc(filp, wait_address, p); } -static inline void poll_initwait_ex(poll_table* pt, poll_queue_proc qproc) +static inline void poll_initwait_ex(poll_table* pt, poll_queue_proc qproc, poll_free_proc fproc) { pt->qproc = qproc; + pt->fproc = fproc; pt->error = 0; pt->table = NULL; } @@ -39,10 +43,15 @@ static inline void poll_initwait_ex(poll_table* pt, poll_queue_proc qproc) static inline void poll_initwait(poll_table* pt) { - poll_initwait_ex(pt, __pollwait); + poll_initwait_ex(pt, __pollwait, __pollfreewait); } -extern void poll_freewait(poll_table* pt); +static inline void poll_freewait(poll_table* pt) +{ + + if (pt && pt->fproc) + pt->fproc(pt); +} /* |
