Commit e64d66c8edf11629aa203328daf898775ee27dd4

Authored by Matthew Wilcox
Committed by Matthew Wilcox
1 parent 6d8982d9b8

wait: Use TASK_NORMAL

Also move wake_up_locked() to be with the related functions

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

Showing 2 changed files with 7 additions and 6 deletions Side-by-side Diff

include/linux/wait.h
... ... @@ -152,14 +152,15 @@
152 152 int FASTCALL(out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned));
153 153 wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int));
154 154  
155   -#define wake_up(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, NULL)
156   -#define wake_up_nr(x, nr) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr, NULL)
157   -#define wake_up_all(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 0, NULL)
  155 +#define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL)
  156 +#define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL)
  157 +#define wake_up_all(x) __wake_up(x, TASK_NORMAL, 0, NULL)
  158 +#define wake_up_locked(x) __wake_up_locked((x), TASK_NORMAL)
  159 +
158 160 #define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL)
159 161 #define wake_up_interruptible_nr(x, nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL)
160 162 #define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL)
161   -#define wake_up_locked(x) __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
162   -#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
  163 +#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1)
163 164  
164 165 #define __wait_event(wq, condition) \
165 166 do { \
... ... @@ -215,7 +215,7 @@
215 215 {
216 216 struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit);
217 217 if (waitqueue_active(wq))
218   - __wake_up(wq, TASK_INTERRUPTIBLE|TASK_UNINTERRUPTIBLE, 1, &key);
  218 + __wake_up(wq, TASK_NORMAL, 1, &key);
219 219 }
220 220 EXPORT_SYMBOL(__wake_up_bit);
221 221