]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/poll.h
poll: allow f_op->poll to sleep
[linux-2.6-omap-h63xx.git] / include / linux / poll.h
index badd98ab06f662a43cf5fc3285aa80ac42c1d849..8c24ef8d99769520e737f2735bbf9dc8f1931db7 100644 (file)
@@ -46,9 +46,9 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
 }
 
 struct poll_table_entry {
-       struct file * filp;
+       struct file *filp;
        wait_queue_t wait;
-       wait_queue_head_t * wait_address;
+       wait_queue_head_t *wait_address;
 };
 
 /*
@@ -56,7 +56,9 @@ struct poll_table_entry {
  */
 struct poll_wqueues {
        poll_table pt;
-       struct poll_table_page * table;
+       struct poll_table_page *table;
+       struct task_struct *polling_task;
+       int triggered;
        int error;
        int inline_index;
        struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES];
@@ -64,6 +66,13 @@ struct poll_wqueues {
 
 extern void poll_initwait(struct poll_wqueues *pwq);
 extern void poll_freewait(struct poll_wqueues *pwq);
+extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
+                                ktime_t *expires, unsigned long slack);
+
+static inline int poll_schedule(struct poll_wqueues *pwq, int state)
+{
+       return poll_schedule_timeout(pwq, state, NULL, 0);
+}
 
 /*
  * Scaleable version of the fd_set.