diff options
| author | 2019-09-16 14:04:28 +0200 | |
|---|---|---|
| committer | 2019-09-16 14:05:04 +0200 | |
| commit | 563c4f85f9f0d63b712081d5b4522152cdcb8b6b (patch) | |
| tree | 92351ab2d60d5fd7ce5745d21c9a60ce6d46c5dd /include/linux/wait.h | |
| parent | sched/psi: Correct overly pessimistic size calculation (diff) | |
| parent | x86/kvm: Use CONFIG_PREEMPTION (diff) | |
Merge branch 'sched/rt' into sched/core, to pick up -rt changes
Pick up the first couple of patches working towards PREEMPT_RT.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/wait.h')
| -rw-r--r-- | include/linux/wait.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index b6f77cf60dd7..30c515520fb2 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -127,6 +127,19 @@ static inline int waitqueue_active(struct wait_queue_head *wq_head) } /** + * wq_has_single_sleeper - check if there is only one sleeper + * @wq_head: wait queue head + * + * Returns true of wq_head has only one sleeper on the list. + * + * Please refer to the comment for waitqueue_active. + */ +static inline bool wq_has_single_sleeper(struct wait_queue_head *wq_head) +{ + return list_is_singular(&wq_head->head); +} + +/** * wq_has_sleeper - check if there are any waiting processes * @wq_head: wait queue head * |
