1 #ifndef __LINUX_RWLOCK_API_SMP_H
2 #define __LINUX_RWLOCK_API_SMP_H
4 #ifndef __LINUX_SPINLOCK_API_SMP_H
5 # error "please don't include this file directly"
43 #ifdef CONFIG_INLINE_READ_LOCK
44 #define _raw_read_lock(lock) __raw_read_lock(lock)
47 #ifdef CONFIG_INLINE_WRITE_LOCK
48 #define _raw_write_lock(lock) __raw_write_lock(lock)
51 #ifdef CONFIG_INLINE_READ_LOCK_BH
52 #define _raw_read_lock_bh(lock) __raw_read_lock_bh(lock)
55 #ifdef CONFIG_INLINE_WRITE_LOCK_BH
56 #define _raw_write_lock_bh(lock) __raw_write_lock_bh(lock)
59 #ifdef CONFIG_INLINE_READ_LOCK_IRQ
60 #define _raw_read_lock_irq(lock) __raw_read_lock_irq(lock)
63 #ifdef CONFIG_INLINE_WRITE_LOCK_IRQ
64 #define _raw_write_lock_irq(lock) __raw_write_lock_irq(lock)
67 #ifdef CONFIG_INLINE_READ_LOCK_IRQSAVE
68 #define _raw_read_lock_irqsave(lock) __raw_read_lock_irqsave(lock)
71 #ifdef CONFIG_INLINE_WRITE_LOCK_IRQSAVE
72 #define _raw_write_lock_irqsave(lock) __raw_write_lock_irqsave(lock)
75 #ifdef CONFIG_INLINE_READ_TRYLOCK
76 #define _raw_read_trylock(lock) __raw_read_trylock(lock)
79 #ifdef CONFIG_INLINE_WRITE_TRYLOCK
80 #define _raw_write_trylock(lock) __raw_write_trylock(lock)
83 #ifdef CONFIG_INLINE_READ_UNLOCK
84 #define _raw_read_unlock(lock) __raw_read_unlock(lock)
87 #ifdef CONFIG_INLINE_WRITE_UNLOCK
88 #define _raw_write_unlock(lock) __raw_write_unlock(lock)
91 #ifdef CONFIG_INLINE_READ_UNLOCK_BH
92 #define _raw_read_unlock_bh(lock) __raw_read_unlock_bh(lock)
95 #ifdef CONFIG_INLINE_WRITE_UNLOCK_BH
96 #define _raw_write_unlock_bh(lock) __raw_write_unlock_bh(lock)
99 #ifdef CONFIG_INLINE_READ_UNLOCK_IRQ
100 #define _raw_read_unlock_irq(lock) __raw_read_unlock_irq(lock)
103 #ifdef CONFIG_INLINE_WRITE_UNLOCK_IRQ
104 #define _raw_write_unlock_irq(lock) __raw_write_unlock_irq(lock)
107 #ifdef CONFIG_INLINE_READ_UNLOCK_IRQRESTORE
108 #define _raw_read_unlock_irqrestore(lock, flags) \
109 __raw_read_unlock_irqrestore(lock, flags)
112 #ifdef CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE
113 #define _raw_write_unlock_irqrestore(lock, flags) \
114 __raw_write_unlock_irqrestore(lock, flags)
117 static inline int __raw_read_trylock(
rwlock_t *lock)
128 static inline int __raw_write_trylock(
rwlock_t *lock)
144 #if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)
146 static inline void __raw_read_lock(
rwlock_t *lock)
153 static inline unsigned long __raw_read_lock_irqsave(
rwlock_t *lock)
165 static inline void __raw_read_lock_irq(
rwlock_t *lock)
173 static inline void __raw_read_lock_bh(
rwlock_t *lock)
181 static inline unsigned long __raw_write_lock_irqsave(
rwlock_t *lock)
193 static inline void __raw_write_lock_irq(
rwlock_t *lock)
201 static inline void __raw_write_lock_bh(
rwlock_t *lock)
209 static inline void __raw_write_lock(
rwlock_t *lock)
218 static inline void __raw_write_unlock(
rwlock_t *lock)
225 static inline void __raw_read_unlock(
rwlock_t *lock)
233 __raw_read_unlock_irqrestore(
rwlock_t *lock,
unsigned long flags)
241 static inline void __raw_read_unlock_irq(
rwlock_t *lock)
249 static inline void __raw_read_unlock_bh(
rwlock_t *lock)
257 static inline void __raw_write_unlock_irqrestore(
rwlock_t *lock,
266 static inline void __raw_write_unlock_irq(
rwlock_t *lock)
274 static inline void __raw_write_unlock_bh(
rwlock_t *lock)