lkml.org 
[lkml]   [2015]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/8] locking/mcs: Better differentiate between mcs variants

* Davidlohr Bueso <dave@stgolabs.net> 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 <dbueso@suse.de>
> ---
> 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


\
 
 \ /
  Last update: 2015-01-14 15:41    [W:0.128 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site