diff options
Diffstat (limited to 'include/linux/wait.h')
-rw-r--r-- | include/linux/wait.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 73960ff09e56..6fb1ba5f9b2f 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -25,6 +25,7 @@ struct wait_bit_key { | |||
25 | void *flags; | 25 | void *flags; |
26 | int bit_nr; | 26 | int bit_nr; |
27 | #define WAIT_ATOMIC_T_BIT_NR -1 | 27 | #define WAIT_ATOMIC_T_BIT_NR -1 |
28 | unsigned long private; | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | struct wait_bit_queue { | 31 | struct wait_bit_queue { |
@@ -141,18 +142,19 @@ __remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old) | |||
141 | list_del(&old->task_list); | 142 | list_del(&old->task_list); |
142 | } | 143 | } |
143 | 144 | ||
145 | typedef int wait_bit_action_f(struct wait_bit_key *); | ||
144 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 146 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
145 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); | 147 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); |
146 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 148 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
147 | void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr); | 149 | void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr); |
148 | void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 150 | void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
149 | void __wake_up_bit(wait_queue_head_t *, void *, int); | 151 | void __wake_up_bit(wait_queue_head_t *, void *, int); |
150 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 152 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, wait_bit_action_f *, unsigned); |
151 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 153 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, wait_bit_action_f *, unsigned); |
152 | void wake_up_bit(void *, int); | 154 | void wake_up_bit(void *, int); |
153 | void wake_up_atomic_t(atomic_t *); | 155 | void wake_up_atomic_t(atomic_t *); |
154 | int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned); | 156 | int out_of_line_wait_on_bit(void *, int, wait_bit_action_f *, unsigned); |
155 | int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned); | 157 | int out_of_line_wait_on_bit_lock(void *, int, wait_bit_action_f *, unsigned); |
156 | int out_of_line_wait_on_atomic_t(atomic_t *, int (*)(atomic_t *), unsigned); | 158 | int out_of_line_wait_on_atomic_t(atomic_t *, int (*)(atomic_t *), unsigned); |
157 | wait_queue_head_t *bit_waitqueue(void *, int); | 159 | wait_queue_head_t *bit_waitqueue(void *, int); |
158 | 160 | ||
@@ -855,8 +857,8 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | |||
855 | } while (0) | 857 | } while (0) |
856 | 858 | ||
857 | 859 | ||
858 | extern int bit_wait(void *); | 860 | extern int bit_wait(struct wait_bit_key *); |
859 | extern int bit_wait_io(void *); | 861 | extern int bit_wait_io(struct wait_bit_key *); |
860 | 862 | ||
861 | /** | 863 | /** |
862 | * wait_on_bit - wait for a bit to be cleared | 864 | * wait_on_bit - wait for a bit to be cleared |
@@ -925,7 +927,7 @@ wait_on_bit_io(void *word, int bit, unsigned mode) | |||
925 | * on that signal. | 927 | * on that signal. |
926 | */ | 928 | */ |
927 | static inline int | 929 | static inline int |
928 | wait_on_bit_action(void *word, int bit, int (*action)(void *), unsigned mode) | 930 | wait_on_bit_action(void *word, int bit, wait_bit_action_f *action, unsigned mode) |
929 | { | 931 | { |
930 | if (!test_bit(bit, word)) | 932 | if (!test_bit(bit, word)) |
931 | return 0; | 933 | return 0; |
@@ -1000,7 +1002,7 @@ wait_on_bit_lock_io(void *word, int bit, unsigned mode) | |||
1000 | * the @mode allows that signal to wake the process. | 1002 | * the @mode allows that signal to wake the process. |
1001 | */ | 1003 | */ |
1002 | static inline int | 1004 | static inline int |
1003 | wait_on_bit_lock_action(void *word, int bit, int (*action)(void *), unsigned mode) | 1005 | wait_on_bit_lock_action(void *word, int bit, wait_bit_action_f *action, unsigned mode) |
1004 | { | 1006 | { |
1005 | if (!test_and_set_bit(bit, word)) | 1007 | if (!test_and_set_bit(bit, word)) |
1006 | return 0; | 1008 | return 0; |