1616 * wait-queues, but the semantics are actually completely different, and
1717 * every single user we have ever had has been buggy (or pointless).
1818 *
19- * A "swake_up ()" only wakes up _one_ waiter, which is not at all what
19+ * A "swake_up_one ()" only wakes up _one_ waiter, which is not at all what
2020 * "wake_up()" does, and has led to problems. In other cases, it has
2121 * been fine, because there's only ever one waiter (kvm), but in that
2222 * case gthe whole "simple" wait-queue is just pointless to begin with,
@@ -115,7 +115,7 @@ extern void __init_swait_queue_head(struct swait_queue_head *q, const char *name
115115 * CPU0 - waker CPU1 - waiter
116116 *
117117 * for (;;) {
118- * @cond = true; prepare_to_swait (&wq_head, &wait, state);
118+ * @cond = true; prepare_to_swait_exclusive (&wq_head, &wait, state);
119119 * smp_mb(); // smp_mb() from set_current_state()
120120 * if (swait_active(wq_head)) if (@cond)
121121 * wake_up(wq_head); break;
@@ -157,11 +157,11 @@ static inline bool swq_has_sleeper(struct swait_queue_head *wq)
157157 return swait_active (wq );
158158}
159159
160- extern void swake_up (struct swait_queue_head * q );
160+ extern void swake_up_one (struct swait_queue_head * q );
161161extern void swake_up_all (struct swait_queue_head * q );
162162extern void swake_up_locked (struct swait_queue_head * q );
163163
164- extern void prepare_to_swait (struct swait_queue_head * q , struct swait_queue * wait , int state );
164+ extern void prepare_to_swait_exclusive (struct swait_queue_head * q , struct swait_queue * wait , int state );
165165extern long prepare_to_swait_event (struct swait_queue_head * q , struct swait_queue * wait , int state );
166166
167167extern void __finish_swait (struct swait_queue_head * q , struct swait_queue * wait );
@@ -196,7 +196,7 @@ __out: __ret; \
196196 (void)___swait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, \
197197 schedule())
198198
199- #define swait_event (wq , condition ) \
199+ #define swait_event_exclusive (wq , condition ) \
200200do { \
201201 if (condition) \
202202 break; \
@@ -208,7 +208,7 @@ do { \
208208 TASK_UNINTERRUPTIBLE, timeout, \
209209 __ret = schedule_timeout(__ret))
210210
211- #define swait_event_timeout (wq , condition , timeout ) \
211+ #define swait_event_timeout_exclusive (wq , condition , timeout ) \
212212({ \
213213 long __ret = timeout; \
214214 if (!___wait_cond_timeout(condition)) \
@@ -220,7 +220,7 @@ do { \
220220 ___swait_event(wq, condition, TASK_INTERRUPTIBLE, 0, \
221221 schedule())
222222
223- #define swait_event_interruptible (wq , condition ) \
223+ #define swait_event_interruptible_exclusive (wq , condition ) \
224224({ \
225225 int __ret = 0; \
226226 if (!(condition)) \
@@ -233,7 +233,7 @@ do { \
233233 TASK_INTERRUPTIBLE, timeout, \
234234 __ret = schedule_timeout(__ret))
235235
236- #define swait_event_interruptible_timeout (wq , condition , timeout ) \
236+ #define swait_event_interruptible_timeout_exclusive (wq , condition , timeout )\
237237({ \
238238 long __ret = timeout; \
239239 if (!___wait_cond_timeout(condition)) \
@@ -246,7 +246,7 @@ do { \
246246 (void)___swait_event(wq, condition, TASK_IDLE, 0, schedule())
247247
248248/**
249- * swait_event_idle - wait without system load contribution
249+ * swait_event_idle_exclusive - wait without system load contribution
250250 * @wq: the waitqueue to wait on
251251 * @condition: a C expression for the event to wait for
252252 *
@@ -257,7 +257,7 @@ do { \
257257 * condition and doesn't want to contribute to system load. Signals are
258258 * ignored.
259259 */
260- #define swait_event_idle (wq , condition ) \
260+ #define swait_event_idle_exclusive (wq , condition ) \
261261do { \
262262 if (condition) \
263263 break; \
@@ -270,7 +270,7 @@ do { \
270270 __ret = schedule_timeout(__ret))
271271
272272/**
273- * swait_event_idle_timeout - wait up to timeout without load contribution
273+ * swait_event_idle_timeout_exclusive - wait up to timeout without load contribution
274274 * @wq: the waitqueue to wait on
275275 * @condition: a C expression for the event to wait for
276276 * @timeout: timeout at which we'll give up in jiffies
@@ -288,7 +288,7 @@ do { \
288288 * or the remaining jiffies (at least 1) if the @condition evaluated
289289 * to %true before the @timeout elapsed.
290290 */
291- #define swait_event_idle_timeout (wq , condition , timeout ) \
291+ #define swait_event_idle_timeout_exclusive (wq , condition , timeout ) \
292292({ \
293293 long __ret = timeout; \
294294 if (!___wait_cond_timeout(condition)) \
0 commit comments