aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r--include/linux/spinlock.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 94b767d64275..61fef376ed2e 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -228,15 +228,30 @@ do { \
228# define read_unlock_irq(lock) _read_unlock_irq(lock) 228# define read_unlock_irq(lock) _read_unlock_irq(lock)
229# define write_unlock_irq(lock) _write_unlock_irq(lock) 229# define write_unlock_irq(lock) _write_unlock_irq(lock)
230#else 230#else
231# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) 231# define spin_unlock(lock) \
232# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) 232 do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0)
233# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) 233# define read_unlock(lock) \
234# define spin_unlock_irq(lock) \ 234 do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0)
235 do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 235# define write_unlock(lock) \
236# define read_unlock_irq(lock) \ 236 do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0)
237 do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 237# define spin_unlock_irq(lock) \
238# define write_unlock_irq(lock) \ 238do { \
239 do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 239 __raw_spin_unlock(&(lock)->raw_lock); \
240 __release(lock); \
241 local_irq_enable(); \
242} while (0)
243# define read_unlock_irq(lock) \
244do { \
245 __raw_read_unlock(&(lock)->raw_lock); \
246 __release(lock); \
247 local_irq_enable(); \
248} while (0)
249# define write_unlock_irq(lock) \
250do { \
251 __raw_write_unlock(&(lock)->raw_lock); \
252 __release(lock); \
253 local_irq_enable(); \
254} while (0)
240#endif 255#endif
241 256
242#define spin_unlock_irqrestore(lock, flags) \ 257#define spin_unlock_irqrestore(lock, flags) \