linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / asm-arm / spinlock.h
index 01b7c26..43ad4e5 100644 (file)
@@ -142,9 +142,6 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
        : "cc");
 }
 
-/* write_can_lock - would write_trylock() succeed? */
-#define __raw_write_can_lock(x)                ((x)->lock == 0x80000000)
-
 /*
  * Read locks are a bit more hairy:
  *  - Exclusively load the lock value.
@@ -199,23 +196,6 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
        : "cc");
 }
 
-static inline int __raw_read_trylock(raw_rwlock_t *rw)
-{
-       unsigned long tmp, tmp2 = 1;
-
-       __asm__ __volatile__(
-"1:    ldrex   %0, [%2]\n"
-"      adds    %0, %0, #1\n"
-"      strexpl %1, %0, [%2]\n"
-       : "=&r" (tmp), "+r" (tmp2)
-       : "r" (&rw->lock)
-       : "cc");
-
-       smp_mb();
-       return tmp2 == 0;
-}
-
-/* read_can_lock - would read_trylock() succeed? */
-#define __raw_read_can_lock(x)         ((x)->lock < 0x80000000)
+#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
 
 #endif /* __ASM_SPINLOCK_H */