aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-06-08 07:04:43 -0400
committerJesper Nilsson <jesper.nilsson@axis.com>2009-06-08 07:05:19 -0400
commitb0903ee8e4853eea35cb24cfb4dda1b60c7948dc (patch)
tree37c75f4c3f0fe13aa85b84f0ad8e587468e78a42 /arch
parentccc0d38ec13d4649d4168c1db590137df53ad783 (diff)
CRIS: assignment/is equal confusion
Somehow, the assignments of rw->lock got written as comparisons. The effect probably was that the read-write spinlocks never locked. However, since the locks are only used in CONFIG_SMP and SMP CRIS is experimental, it has never been identified as a problem. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/include/arch-v32/arch/spinlock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h
index 129756b96661..367a53ea10c5 100644
--- a/arch/cris/include/arch-v32/arch/spinlock.h
+++ b/arch/cris/include/arch-v32/arch/spinlock.h
@@ -78,7 +78,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
78{ 78{
79 __raw_spin_lock(&rw->slock); 79 __raw_spin_lock(&rw->slock);
80 while (rw->lock != RW_LOCK_BIAS); 80 while (rw->lock != RW_LOCK_BIAS);
81 rw->lock == 0; 81 rw->lock = 0;
82 __raw_spin_unlock(&rw->slock); 82 __raw_spin_unlock(&rw->slock);
83} 83}
84 84
@@ -93,7 +93,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
93{ 93{
94 __raw_spin_lock(&rw->slock); 94 __raw_spin_lock(&rw->slock);
95 while (rw->lock != RW_LOCK_BIAS); 95 while (rw->lock != RW_LOCK_BIAS);
96 rw->lock == RW_LOCK_BIAS; 96 rw->lock = RW_LOCK_BIAS;
97 __raw_spin_unlock(&rw->slock); 97 __raw_spin_unlock(&rw->slock);
98} 98}
99 99
@@ -114,7 +114,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
114 int ret = 0; 114 int ret = 0;
115 __raw_spin_lock(&rw->slock); 115 __raw_spin_lock(&rw->slock);
116 if (rw->lock == RW_LOCK_BIAS) { 116 if (rw->lock == RW_LOCK_BIAS) {
117 rw->lock == 0; 117 rw->lock = 0;
118 ret = 1; 118 ret = 1;
119 } 119 }
120 __raw_spin_unlock(&rw->slock); 120 __raw_spin_unlock(&rw->slock);