* Davidlohr Bueso <[email protected]> wrote:
> We have two flavors of the MCS spinlock: standard and cancelable (osq).
> While each one is independent of the other, we currently mix and match
> them. This patch:
>
> o Moves osq code out of mcs_spinlock.h (which only deals with the traditional
> version) into include/linux/osq_lock.h. No unnecessary code is added to the
> more global header file, anything locks that make use of osq must include
> it anyway.
>
> o Renames mcs_spinlock.c to osq_lock.c. This file only contains osq code.
>
> o Introduces a CONFIG_LOCK_SPIN_ON_OWNER in order to only build osq_lock
> if there is support for it.
>
> Signed-off-by: Davidlohr Bueso <[email protected]>
> ---
> include/linux/osq_lock.h | 12 ++-
> kernel/Kconfig.locks | 4 +
> kernel/locking/Makefile | 3 +-
> kernel/locking/mcs_spinlock.c | 208
> ------------------------------------------
> kernel/locking/mcs_spinlock.h | 16 ----
> kernel/locking/osq_lock.c | 203 +++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 219 insertions(+), 227 deletions(-)
> delete mode 100644 kernel/locking/mcs_spinlock.c
> create mode 100644 kernel/locking/osq_lock.c
x86 defconfig produces:
kernel/locking/mcs_spinlock.h:81:2: error: implicit declaration of function
‘ASSIGN_ONCE’ [-Werror=implicit-function-declaration]
Also, this patch should really be split into three separate (and
tested) patches.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/