summaryrefslogtreecommitdiff
path: root/include/linux/bit_spinlock.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-05-01 19:09:39 +0200
committerIngo Molnar <mingo@elte.hu>2011-05-01 19:09:39 +0200
commit809435ff4f43a5c0cb0201b3b89176253d5ade18 (patch)
tree607d673c02117656a956b54dd2bb80fe94edea61 /include/linux/bit_spinlock.h
parent32673822e440eb92eb334631eb0a199d0c532d13 (diff)
parent058e297d34a404caaa5ed277de15698d8dc43000 (diff)
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
Diffstat (limited to 'include/linux/bit_spinlock.h')
-rw-r--r--include/linux/bit_spinlock.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h
index e612575a2596..b4326bfa684f 100644
--- a/include/linux/bit_spinlock.h
+++ b/include/linux/bit_spinlock.h
@@ -23,11 +23,11 @@ static inline void bit_spin_lock(int bitnum, unsigned long *addr)
preempt_disable();
#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
- while (test_bit(bitnum, addr)) {
- preempt_enable();
+ preempt_enable();
+ do {
cpu_relax();
- preempt_disable();
- }
+ } while (test_bit(bitnum, addr));
+ preempt_disable();
}
#endif
__acquire(bitlock);