diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-19 16:42:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-19 16:42:11 -0700 |
commit | 890f74291c9133eaed6c0eb8514f7618d43d0925 (patch) | |
tree | 445a9de7b2e554bde5ec9d18d67f2c56e8477d16 /include | |
parent | b0c51b7d650d5109c8e71e19d5e7ce9b71af7dff (diff) | |
parent | c2a4c40651e08e465d3a6130bd9f6dcc1ce21d83 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 3533/1: Implement the __raw_(read|write)_can_lock functions on ARM
[ARM] 3530/1: PXA Mainstone: prevent double enable_irq() in pcmcia
[ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction
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 43ad4e55878..406ca97a8ab 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 */ |