poll: avoid extra wakeups in select/poll
[sfrench/cifs-2.6.git] / include / linux / poll.h
index 8c24ef8d99769520e737f2735bbf9dc8f1931db7..fa287f25138dc2a243e27825f92d670b210a4b6b 100644 (file)
@@ -32,6 +32,7 @@ typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_
 
 typedef struct poll_table_struct {
        poll_queue_proc qproc;
+       unsigned long key;
 } poll_table;
 
 static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
@@ -43,10 +44,12 @@ static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres
 static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
 {
        pt->qproc = qproc;
+       pt->key   = ~0UL; /* all events enabled */
 }
 
 struct poll_table_entry {
        struct file *filp;
+       unsigned long key;
        wait_queue_t wait;
        wait_queue_head_t *wait_address;
 };