aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2009-02-08 17:39:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-09 08:15:39 -0800
commita5ef7ca0e2636bad0ccd07b996d775348ae2b65e (patch)
treefcc1ef7e4bd95ce58d5bbb74ad129bdc248252ca /include
parentd5b562330ec766292a3ac54ae5e0673610bd5b3d (diff)
x86: spinlocks: define dummy __raw_spin_is_contended
Architectures other than mips and x86 are not using ticket spinlocks. Therefore, the contention on the lock is meaningless, since there is nobody known to be waiting on it (arguably /fairly/ unfair locks). Dummy it out to return 0 on other architectures. Signed-off-by: Kyle McMartin <kyle@redhat.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/spinlock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index e0c0fccced4..a0c66a2e00a 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -124,7 +124,12 @@ do { \
#ifdef CONFIG_GENERIC_LOCKBREAK
#define spin_is_contended(lock) ((lock)->break_lock)
#else
+
+#ifdef __raw_spin_is_contended
#define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock)
+#else
+#define spin_is_contended(lock) (((void)(lock), 0))
+#endif /*__raw_spin_is_contended*/
#endif
/**