diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rwlock.h | 20 | ||||
-rw-r--r-- | include/linux/spinlock_up.h | 16 |
2 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h index 73785b0bd6b9..5725b034defe 100644 --- a/include/linux/rwlock.h +++ b/include/linux/rwlock.h | |||
@@ -38,20 +38,20 @@ do { \ | |||
38 | extern int _raw_write_trylock(rwlock_t *lock); | 38 | extern int _raw_write_trylock(rwlock_t *lock); |
39 | extern void _raw_write_unlock(rwlock_t *lock); | 39 | extern void _raw_write_unlock(rwlock_t *lock); |
40 | #else | 40 | #else |
41 | # define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock) | 41 | # define _raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) |
42 | # define _raw_read_lock_flags(lock, flags) \ | 42 | # define _raw_read_lock_flags(lock, flags) \ |
43 | __raw_read_lock_flags(&(lock)->raw_lock, *(flags)) | 43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) |
44 | # define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) | 44 | # define _raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) |
45 | # define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) | 45 | # define _raw_read_unlock(rwlock) arch_read_unlock(&(rwlock)->raw_lock) |
46 | # define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock) | 46 | # define _raw_write_lock(rwlock) arch_write_lock(&(rwlock)->raw_lock) |
47 | # define _raw_write_lock_flags(lock, flags) \ | 47 | # define _raw_write_lock_flags(lock, flags) \ |
48 | __raw_write_lock_flags(&(lock)->raw_lock, *(flags)) | 48 | arch_write_lock_flags(&(lock)->raw_lock, *(flags)) |
49 | # define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) | 49 | # define _raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) |
50 | # define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock) | 50 | # define _raw_write_unlock(rwlock) arch_write_unlock(&(rwlock)->raw_lock) |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock) | 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) |
54 | #define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock) | 54 | #define write_can_lock(rwlock) arch_write_can_lock(&(rwlock)->raw_lock) |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Define the various rw_lock methods. Note we define these | 57 | * Define the various rw_lock methods. Note we define these |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index 1d3bcc3cf7c6..b14f6a91e19f 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -49,12 +49,12 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock) | |||
49 | /* | 49 | /* |
50 | * Read-write spinlocks. No debug version. | 50 | * Read-write spinlocks. No debug version. |
51 | */ | 51 | */ |
52 | #define __raw_read_lock(lock) do { (void)(lock); } while (0) | 52 | #define arch_read_lock(lock) do { (void)(lock); } while (0) |
53 | #define __raw_write_lock(lock) do { (void)(lock); } while (0) | 53 | #define arch_write_lock(lock) do { (void)(lock); } while (0) |
54 | #define __raw_read_trylock(lock) ({ (void)(lock); 1; }) | 54 | #define arch_read_trylock(lock) ({ (void)(lock); 1; }) |
55 | #define __raw_write_trylock(lock) ({ (void)(lock); 1; }) | 55 | #define arch_write_trylock(lock) ({ (void)(lock); 1; }) |
56 | #define __raw_read_unlock(lock) do { (void)(lock); } while (0) | 56 | #define arch_read_unlock(lock) do { (void)(lock); } while (0) |
57 | #define __raw_write_unlock(lock) do { (void)(lock); } while (0) | 57 | #define arch_write_unlock(lock) do { (void)(lock); } while (0) |
58 | 58 | ||
59 | #else /* DEBUG_SPINLOCK */ | 59 | #else /* DEBUG_SPINLOCK */ |
60 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | 60 | #define arch_spin_is_locked(lock) ((void)(lock), 0) |
@@ -67,8 +67,8 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock) | |||
67 | 67 | ||
68 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | 68 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) |
69 | 69 | ||
70 | #define __raw_read_can_lock(lock) (((void)(lock), 1)) | 70 | #define arch_read_can_lock(lock) (((void)(lock), 1)) |
71 | #define __raw_write_can_lock(lock) (((void)(lock), 1)) | 71 | #define arch_write_can_lock(lock) (((void)(lock), 1)) |
72 | 72 | ||
73 | #define arch_spin_unlock_wait(lock) \ | 73 | #define arch_spin_unlock_wait(lock) \ |
74 | do { cpu_relax(); } while (arch_spin_is_locked(lock)) | 74 | do { cpu_relax(); } while (arch_spin_is_locked(lock)) |