]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched: Add wait/wake interface for variable updated under a lock.
authorNeilBrown <neilb@suse.de>
Wed, 25 Sep 2024 05:31:42 +0000 (15:31 +1000)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 7 Oct 2024 07:28:38 +0000 (09:28 +0200)
commitcc2e1c82d7e474753681a38b07b63034e107e369
tree0f5f99701b7f38788b65bb61add50d7f46fa0a7c
parent52d633def56c10fe3e82a2c5d88c3ecb3f4e4852
sched: Add wait/wake interface for variable updated under a lock.

Sometimes we need to wait for a condition to be true which must be
testing while holding a lock.  Correspondingly the condition is made
true while holding the lock and the wake up is sent under the lock.

This patch provides wake and wait interfaces which can be used for this
situation when the lock is a mutex or a spinlock, or any other lock for
which there are foo_lock() and foo_unlock() functions.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240925053405.3960701-6-neilb@suse.de
include/linux/wait_bit.h