diff options
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) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * wq_has_single_sleeper - check if there is only one sleeper | ||
131 | * @wq_head: wait queue head | ||
132 | * | ||
133 | * Returns true of wq_head has only one sleeper on the list. | ||
134 | * | ||
135 | * Please refer to the comment for waitqueue_active. | ||
136 | */ | ||
137 | static inline bool wq_has_single_sleeper(struct wait_queue_head *wq_head) | ||
138 | { | ||
139 | return list_is_singular(&wq_head->head); | ||
140 | } | ||
141 | |||
142 | /** | ||
130 | * wq_has_sleeper - check if there are any waiting processes | 143 | * wq_has_sleeper - check if there are any waiting processes |
131 | * @wq_head: wait queue head | 144 | * @wq_head: wait queue head |
132 | * | 145 | * |