diff options
Diffstat (limited to 'include/linux/sched/wake_q.h')
| -rw-r--r-- | include/linux/sched/wake_q.h | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h index 10b19a192b2d..ad826d2a4557 100644 --- a/include/linux/sched/wake_q.h +++ b/include/linux/sched/wake_q.h @@ -24,9 +24,13 @@   * called near the end of a function. Otherwise, the list can be   * re-initialized for later re-use by wake_q_init().   * - * Note that this can cause spurious wakeups. schedule() callers + * NOTE that this can cause spurious wakeups. schedule() callers   * must ensure the call is done inside a loop, confirming that the   * wakeup condition has in fact occurred. + * + * NOTE that there is no guarantee the wakeup will happen any later than the + * wake_q_add() location. Therefore task must be ready to be woken at the + * location of the wake_q_add().   */  #include <linux/sched.h> @@ -47,8 +51,8 @@ static inline void wake_q_init(struct wake_q_head *head)  	head->lastp = &head->first;  } -extern void wake_q_add(struct wake_q_head *head, -		       struct task_struct *task); +extern void wake_q_add(struct wake_q_head *head, struct task_struct *task); +extern void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task);  extern void wake_up_q(struct wake_q_head *head);  #endif /* _LINUX_SCHED_WAKE_Q_H */  |