From a3e34b5837f3918e936ed51706f6f4a0c34739fa Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 19 May 2006 21:55:35 +0100 Subject: [PATCH] --- yaml --- r: 26801 b: refs/heads/master c: c2a4c40651e08e465d3a6130bd9f6dcc1ce21d83 h: refs/heads/master i: 26799: 9c3716303fc6d8bf7d12c8e1e4c78f4e5c10b209 v: v3 --- [refs] | 2 +- trunk/include/asm-arm/spinlock.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 55cf9c362394..096d0ba7d302 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ec64152fee25e2a63f06d40d32c7b4cb62eab9a3 +refs/heads/master: c2a4c40651e08e465d3a6130bd9f6dcc1ce21d83 diff --git a/trunk/include/asm-arm/spinlock.h b/trunk/include/asm-arm/spinlock.h index 43ad4e55878c..406ca97a8ab2 100644 --- a/trunk/include/asm-arm/spinlock.h +++ b/trunk/include/asm-arm/spinlock.h @@ -142,6 +142,9 @@ 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. @@ -198,4 +201,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) +/* read_can_lock - would read_trylock() succeed? */ +#define __raw_read_can_lock(x) ((x)->lock < 0x80000000) + #endif /* __ASM_SPINLOCK_H */