Files
linux/include
Linus Torvalds cea5f91daa wait-event: clean up the internal helper arguments
The ___wait_event() helper for historical reasons took a "0/1" argument
for whether the wait-queue entry should be marked WQ_FLAG_EXCLUSIVE or
not.  That didn't really help readability, but it also limited the
wq_flags for that helper to only that one flag.

Just make that macro argument be the actual 'wq_flags' value, which
simplifies the helper, and makes it more generic.  It also happens to
make the users of this macro more obvious when an unexplained '1'
argument becomes a more self-explanatory 'WQ_FLAG_EXCLUSIVE'.

Also change the existing users that use that raw ___wait_event()
interface with just a plain schedule() to use the pre-existing helpers
macros: __wait_event_state() and __wait_event_state_exclusive().

[ This is not a bug-fix: it was prep-work for a bug report that turned
  out to be just a "don't do that" situation instead. But I also didn't
  want to just throw it away or leave it pending, since it just made
  some of that grotty code much clearer - Linus]

Reviewed-by: Oleg Nesterov <[email protected]>
Link: https://lore.kernel.org/all/20261111-pipe-epollexclusive-wakeup-v1-1-0af6283e9fda@columbia.edu/
Signed-off-by: Linus Torvalds <[email protected]>
2026-11-18 07:54:26 -08:00
..
…
…
…
…
…
…
…
…
…