diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2006-05-20 00:55:35 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-05-20 00:55:35 +0400 |
commit | c2a4c40651e08e465d3a6130bd9f6dcc1ce21d83 (patch) | |
tree | e8cc87fa6e0afad219b82655df183a3412a2f1d3 /include | |
parent | ec64152fee25e2a63f06d40d32c7b4cb62eab9a3 (diff) | |
download | linux-c2a4c40651e08e465d3a6130bd9f6dcc1ce21d83.tar.xz |
[ARM] 3533/1: Implement the __raw_(read|write)_can_lock functions on ARM
Patch from Catalin Marinas
Recent patches introduced the write_can_lock() call in the kernel/ptrace.c
file. Implement the __raw_* variants on ARM (SMP) as well.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/spinlock.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 43ad4e55878c..406ca97a8ab2 100644 --- a/include/asm-arm/spinlock.h +++ b/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 */ |