mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
locking: Convert raw_rwlock to arch_rwlock
Not strictly necessary for -rt as -rt does not have non sleeping rwlocks, but it's odd to not have a consistent naming convention. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: [email protected]
This commit is contained in:
parent
0199c4e68d
commit
fb3a6bbc91
32 changed files with 151 additions and 151 deletions
|
|
@ -148,7 +148,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
|
|||
*/
|
||||
#define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
|
||||
|
||||
static inline void __raw_read_lock(raw_rwlock_t *rw)
|
||||
static inline void __raw_read_lock(arch_rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp0, tmp1;
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
|
|||
);
|
||||
}
|
||||
|
||||
static inline void __raw_write_lock(raw_rwlock_t *rw)
|
||||
static inline void __raw_write_lock(arch_rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp0, tmp1, tmp2;
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
|
|||
);
|
||||
}
|
||||
|
||||
static inline void __raw_read_unlock(raw_rwlock_t *rw)
|
||||
static inline void __raw_read_unlock(arch_rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp0, tmp1;
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
|
|||
);
|
||||
}
|
||||
|
||||
static inline void __raw_write_unlock(raw_rwlock_t *rw)
|
||||
static inline void __raw_write_unlock(arch_rwlock_t *rw)
|
||||
{
|
||||
unsigned long tmp0, tmp1, tmp2;
|
||||
|
||||
|
|
@ -298,7 +298,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
|
|||
);
|
||||
}
|
||||
|
||||
static inline int __raw_read_trylock(raw_rwlock_t *lock)
|
||||
static inline int __raw_read_trylock(arch_rwlock_t *lock)
|
||||
{
|
||||
atomic_t *count = (atomic_t*)lock;
|
||||
if (atomic_dec_return(count) >= 0)
|
||||
|
|
@ -307,7 +307,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int __raw_write_trylock(raw_rwlock_t *lock)
|
||||
static inline int __raw_write_trylock(arch_rwlock_t *lock)
|
||||
{
|
||||
atomic_t *count = (atomic_t *)lock;
|
||||
if (atomic_sub_and_test(RW_LOCK_BIAS, count))
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
volatile int lock;
|
||||
} raw_rwlock_t;
|
||||
} arch_rwlock_t;
|
||||
|
||||
#define RW_LOCK_BIAS 0x01000000
|
||||
#define RW_LOCK_BIAS_STR "0x01000000"
|
||||
|
||||
#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
|
||||
#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
|
||||
|
||||
#endif /* _ASM_M32R_SPINLOCK_TYPES_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue