Properly emulate wait_event_interruptible_locked().
authorclaudio <claudio@openbsd.org>
Fri, 28 Jul 2023 09:46:13 +0000 (09:46 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 28 Jul 2023 09:46:13 +0000 (09:46 +0000)
commitd6d1d580bbad0ce6f2186f18fbb3293862741cd0
tree6b4d0c826ae5a23ef833ff65326caec7e12ec486
parent20254eec42a118c64a54bd36c7c77e024a99bb8d
Properly emulate wait_event_interruptible_locked().
This function is called with the wait_queue_head locked, so the code
can not use prepare_to_wait()/finish_wait() since these assume the
wqh is unlocked. Also the lock needs to be held right up to the
schedule()/sleep_finish() call.
OK kettenis@ jsg@
sys/dev/pci/drm/include/linux/wait.h