aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/queuelock.h
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-01-17 12:44:00 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-01-17 12:44:00 -0500
commit99a0060403d4785f8a5958a0e4d210c5eb2f19de (patch)
tree67748f9eb9d28b447764a99bbb53d033c260bdfa /include/linux/queuelock.h
parentbdfe8d2b30f4877d2d4def7aaf1be8fa7b54d84d (diff)
[cleanup] remove trailing whitespace
Diffstat (limited to 'include/linux/queuelock.h')
-rw-r--r--include/linux/queuelock.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/queuelock.h b/include/linux/queuelock.h
index 454ff817fb..c289c21b3e 100644
--- a/include/linux/queuelock.h
+++ b/include/linux/queuelock.h
@@ -8,9 +8,9 @@
8* as much as possible. The rules for acquiring a lock are: 8* as much as possible. The rules for acquiring a lock are:
9* 9*
10* 1) The caller must ensure interrupts and preemptions are disabled. 10* 1) The caller must ensure interrupts and preemptions are disabled.
11* 11*
12* 2) The caller _cannot_ recursively acquire the lock. 12* 2) The caller _cannot_ recursively acquire the lock.
13* 13*
14* 3) The caller may not sleep while holding the lock. This is currently 14* 3) The caller may not sleep while holding the lock. This is currently
15* not enforced, but it will not work. 15* not enforced, but it will not work.
16*/ 16*/
@@ -64,7 +64,7 @@ static inline void queue_lock(queuelock_t *lock)
64 */ 64 */
65 lock->spin_slot[me] = atomic_inc_return(&lock->next_slot) - 1; 65 lock->spin_slot[me] = atomic_inc_return(&lock->next_slot) - 1;
66 /* check for wrap-around 66 /* check for wrap-around
67 * This could probably optimized away if we ensure that NR_CPUS divides 67 * This could probably optimized away if we ensure that NR_CPUS divides
68 * INT_MAX... 68 * INT_MAX...
69 */ 69 */
70 if (unlikely(lock->spin_slot[me] == NR_CPUS - 1)) 70 if (unlikely(lock->spin_slot[me] == NR_CPUS - 1))
@@ -74,7 +74,7 @@ static inline void queue_lock(queuelock_t *lock)
74 /* spin until you acquire the lock */ 74 /* spin until you acquire the lock */
75 spin_var = (int*) &lock->slots[lock->spin_slot[me]].val; 75 spin_var = (int*) &lock->slots[lock->spin_slot[me]].val;
76 while (*spin_var == MUST_WAIT) 76 while (*spin_var == MUST_WAIT)
77 cpu_relax(); 77 cpu_relax();
78 78
79 /* reset the lock */ 79 /* reset the lock */
80 lock->slots[lock->spin_slot[me]].val = MUST_WAIT; 80 lock->slots[lock->spin_slot[me]].val = MUST_WAIT;