mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
locking: Allow obtaining result of arch_mcs_spin_lock_contended
To support upcoming changes that require inspecting the return value once the conditional waiting loop in arch_mcs_spin_lock_contended terminates, modify the macro to preserve the result of smp_cond_load_acquire. This enables checking the return value as needed, which will help disambiguate the MCS node’s locked state in future patches. Reviewed-by: Barret Rhoden <brho@google.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20250316040541.108729-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
ac08f68f1f
commit
c0149a0345
@@ -24,9 +24,7 @@
|
||||
* spinning, and smp_cond_load_acquire() provides that behavior.
|
||||
*/
|
||||
#define arch_mcs_spin_lock_contended(l) \
|
||||
do { \
|
||||
smp_cond_load_acquire(l, VAL); \
|
||||
} while (0)
|
||||
smp_cond_load_acquire(l, VAL)
|
||||
#endif
|
||||
|
||||
#ifndef arch_mcs_spin_unlock_contended
|
||||
|
||||
Reference in New Issue
Block a user