aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched/wake_q.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched/wake_q.h')
-rw-r--r--include/linux/sched/wake_q.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h
index ad826d2a4557..26a2013ac39c 100644
--- a/include/linux/sched/wake_q.h
+++ b/include/linux/sched/wake_q.h
@@ -51,6 +51,11 @@ static inline void wake_q_init(struct wake_q_head *head)
head->lastp = &head->first;
}
+static inline bool wake_q_empty(struct wake_q_head *head)
+{
+ return head->first == WAKE_Q_TAIL;
+}
+
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);