diff options
Diffstat (limited to 'include/linux/rwlock.h')
-rw-r--r-- | include/linux/rwlock.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h index bd799bc6d086..71e0b00b6f2c 100644 --- a/include/linux/rwlock.h +++ b/include/linux/rwlock.h | |||
@@ -38,7 +38,7 @@ do { \ | |||
38 | extern int do_raw_write_trylock(rwlock_t *lock); | 38 | extern int do_raw_write_trylock(rwlock_t *lock); |
39 | extern void do_raw_write_unlock(rwlock_t *lock); | 39 | extern void do_raw_write_unlock(rwlock_t *lock); |
40 | #else | 40 | #else |
41 | # define do_raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) | 41 | # define do_raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) |
42 | # define do_raw_read_lock_flags(lock, flags) \ | 42 | # define do_raw_read_lock_flags(lock, flags) \ |
43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) | 43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) |
44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) | 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) |
@@ -58,23 +58,23 @@ do { \ | |||
58 | * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various | 58 | * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various |
59 | * methods are defined as nops in the case they are not required. | 59 | * methods are defined as nops in the case they are not required. |
60 | */ | 60 | */ |
61 | #define read_trylock(lock) __cond_lock(lock, _read_trylock(lock)) | 61 | #define read_trylock(lock) __cond_lock(lock, _raw_read_trylock(lock)) |
62 | #define write_trylock(lock) __cond_lock(lock, _write_trylock(lock)) | 62 | #define write_trylock(lock) __cond_lock(lock, _raw_write_trylock(lock)) |
63 | 63 | ||
64 | #define write_lock(lock) _write_lock(lock) | 64 | #define write_lock(lock) _raw_write_lock(lock) |
65 | #define read_lock(lock) _read_lock(lock) | 65 | #define read_lock(lock) _raw_read_lock(lock) |
66 | 66 | ||
67 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 67 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
68 | 68 | ||
69 | #define read_lock_irqsave(lock, flags) \ | 69 | #define read_lock_irqsave(lock, flags) \ |
70 | do { \ | 70 | do { \ |
71 | typecheck(unsigned long, flags); \ | 71 | typecheck(unsigned long, flags); \ |
72 | flags = _read_lock_irqsave(lock); \ | 72 | flags = _raw_read_lock_irqsave(lock); \ |
73 | } while (0) | 73 | } while (0) |
74 | #define write_lock_irqsave(lock, flags) \ | 74 | #define write_lock_irqsave(lock, flags) \ |
75 | do { \ | 75 | do { \ |
76 | typecheck(unsigned long, flags); \ | 76 | typecheck(unsigned long, flags); \ |
77 | flags = _write_lock_irqsave(lock); \ | 77 | flags = _raw_write_lock_irqsave(lock); \ |
78 | } while (0) | 78 | } while (0) |
79 | 79 | ||
80 | #else | 80 | #else |
@@ -82,38 +82,38 @@ do { \ | |||
82 | #define read_lock_irqsave(lock, flags) \ | 82 | #define read_lock_irqsave(lock, flags) \ |
83 | do { \ | 83 | do { \ |
84 | typecheck(unsigned long, flags); \ | 84 | typecheck(unsigned long, flags); \ |
85 | _read_lock_irqsave(lock, flags); \ | 85 | _raw_read_lock_irqsave(lock, flags); \ |
86 | } while (0) | 86 | } while (0) |
87 | #define write_lock_irqsave(lock, flags) \ | 87 | #define write_lock_irqsave(lock, flags) \ |
88 | do { \ | 88 | do { \ |
89 | typecheck(unsigned long, flags); \ | 89 | typecheck(unsigned long, flags); \ |
90 | _write_lock_irqsave(lock, flags); \ | 90 | _raw_write_lock_irqsave(lock, flags); \ |
91 | } while (0) | 91 | } while (0) |
92 | 92 | ||
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #define read_lock_irq(lock) _read_lock_irq(lock) | 95 | #define read_lock_irq(lock) _raw_read_lock_irq(lock) |
96 | #define read_lock_bh(lock) _read_lock_bh(lock) | 96 | #define read_lock_bh(lock) _raw_read_lock_bh(lock) |
97 | #define write_lock_irq(lock) _write_lock_irq(lock) | 97 | #define write_lock_irq(lock) _raw_write_lock_irq(lock) |
98 | #define write_lock_bh(lock) _write_lock_bh(lock) | 98 | #define write_lock_bh(lock) _raw_write_lock_bh(lock) |
99 | #define read_unlock(lock) _read_unlock(lock) | 99 | #define read_unlock(lock) _raw_read_unlock(lock) |
100 | #define write_unlock(lock) _write_unlock(lock) | 100 | #define write_unlock(lock) _raw_write_unlock(lock) |
101 | #define read_unlock_irq(lock) _read_unlock_irq(lock) | 101 | #define read_unlock_irq(lock) _raw_read_unlock_irq(lock) |
102 | #define write_unlock_irq(lock) _write_unlock_irq(lock) | 102 | #define write_unlock_irq(lock) _raw_write_unlock_irq(lock) |
103 | 103 | ||
104 | #define read_unlock_irqrestore(lock, flags) \ | 104 | #define read_unlock_irqrestore(lock, flags) \ |
105 | do { \ | 105 | do { \ |
106 | typecheck(unsigned long, flags); \ | 106 | typecheck(unsigned long, flags); \ |
107 | _read_unlock_irqrestore(lock, flags); \ | 107 | _raw_read_unlock_irqrestore(lock, flags); \ |
108 | } while (0) | 108 | } while (0) |
109 | #define read_unlock_bh(lock) _read_unlock_bh(lock) | 109 | #define read_unlock_bh(lock) _raw_read_unlock_bh(lock) |
110 | 110 | ||
111 | #define write_unlock_irqrestore(lock, flags) \ | 111 | #define write_unlock_irqrestore(lock, flags) \ |
112 | do { \ | 112 | do { \ |
113 | typecheck(unsigned long, flags); \ | 113 | typecheck(unsigned long, flags); \ |
114 | _write_unlock_irqrestore(lock, flags); \ | 114 | _raw_write_unlock_irqrestore(lock, flags); \ |
115 | } while (0) | 115 | } while (0) |
116 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 116 | #define write_unlock_bh(lock) _raw_write_unlock_bh(lock) |
117 | 117 | ||
118 | #define write_trylock_irqsave(lock, flags) \ | 118 | #define write_trylock_irqsave(lock, flags) \ |
119 | ({ \ | 119 | ({ \ |