spinlock: improve spin_is_locked() for recursive locks
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2016 15:16:23 +0000 (17:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2016 15:16:23 +0000 (17:16 +0200)
commitbb9373a802f5413880dec591a57292a877178d17
tree5a3e4e598e0aa308b0cdfa12996314d69c066c3f
parent9979547be5875437abae58401093279113258b18
spinlock: improve spin_is_locked() for recursive locks

Recursive locks know their current owner, and since we use the function
solely to determine whether a particular lock is being held by the
current CPU (which so far has been an imprecise check), make actually
check the owner for recusrively acquired locks.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Quan Xu <quan.xu@intel.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/common/spinlock.c