diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2011-05-20 00:43:00 -0600 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2011-05-20 00:43:00 -0600 |
| commit | 78fab4c04c76b8c9327541bd270f82b85b42bbf7 (patch) | |
| tree | b43006348a1ac15c28e6791d08646809761a2a4a /include/linux/bit_spinlock.h | |
| parent | 3b8a4dd3ebfcc647260ad5c39ef4f73eb3a6b155 (diff) | |
| parent | 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff) | |
Merge commit 'v2.6.39' into spi/next
Diffstat (limited to 'include/linux/bit_spinlock.h')
| -rw-r--r-- | include/linux/bit_spinlock.h | 8 |
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); |
