mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Move the definition of the struct mcs_spinlock from the private mcs_spinlock.h header in kernel/locking to the mcs_spinlock.h asm-generic header, since we will need to reference it from the qspinlock.h header in subsequent commits. Reviewed-by: Barret Rhoden <brho@google.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20250316040541.108729-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
19 lines
402 B
C
19 lines
402 B
C
#ifndef __ASM_MCS_SPINLOCK_H
|
|
#define __ASM_MCS_SPINLOCK_H
|
|
|
|
struct mcs_spinlock {
|
|
struct mcs_spinlock *next;
|
|
int locked; /* 1 if lock acquired */
|
|
int count; /* nesting count, see qspinlock.c */
|
|
};
|
|
|
|
/*
|
|
* Architectures can define their own:
|
|
*
|
|
* arch_mcs_spin_lock_contended(l)
|
|
* arch_mcs_spin_unlock_contended(l)
|
|
*
|
|
* See kernel/locking/mcs_spinlock.c.
|
|
*/
|
|
|
|
#endif /* __ASM_MCS_SPINLOCK_H */
|