--- zzzz-none-000/linux-3.10.107/include/linux/wait.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/include/linux/wait.h 2021-11-10 11:53:56.000000000 +0000 @@ -130,8 +130,8 @@ __add_wait_queue_tail(q, wait); } -static inline void __remove_wait_queue(wait_queue_head_t *head, - wait_queue_t *old) +static inline void __remove_wait_queue(wait_queue_head_t *head __maybe_unused, + wait_queue_t *old) { list_del(&old->task_list); } @@ -150,16 +150,28 @@ int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned); wait_queue_head_t *bit_waitqueue(void *, int); -#define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) -#define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL) -#define wake_up_all(x) __wake_up(x, TASK_NORMAL, 0, NULL) -#define wake_up_locked(x) __wake_up_locked((x), TASK_NORMAL, 1) -#define wake_up_all_locked(x) __wake_up_locked((x), TASK_NORMAL, 0) +static inline void ___wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, void *key) { + CHECK_YIELD_CONTEXT(q); + __wake_up(q, mode, nr_exclusive, key); +} +static inline void ___wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr) { + CHECK_YIELD_CONTEXT(q); + __wake_up_locked(q, mode, nr); +} +static inline void ___wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr) { + CHECK_YIELD_CONTEXT(q); + __wake_up_sync(q, mode, nr); +} +#define wake_up(x) ___wake_up(x, TASK_NORMAL, 1, NULL) +#define wake_up_nr(x, nr) ___wake_up(x, TASK_NORMAL, nr, NULL) +#define wake_up_all(x) ___wake_up(x, TASK_NORMAL, 0, NULL) +#define wake_up_locked(x) ___wake_up_locked((x), TASK_NORMAL, 1) +#define wake_up_all_locked(x) ___wake_up_locked((x), TASK_NORMAL, 0) -#define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL) -#define wake_up_interruptible_nr(x, nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL) -#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) -#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) +#define wake_up_interruptible(x) ___wake_up(x, TASK_INTERRUPTIBLE, 1, NULL) +#define wake_up_interruptible_nr(x, nr) ___wake_up(x, TASK_INTERRUPTIBLE, nr, NULL) +#define wake_up_interruptible_all(x) ___wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) +#define wake_up_interruptible_sync(x) ___wake_up_sync((x), TASK_INTERRUPTIBLE, 1) /* * Wakeup macros to be used to report events to the targets.