mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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]>