aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mutex.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 0d50ea3df689..6a735c72f23f 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -120,14 +120,17 @@ static inline int fastcall mutex_is_locked(struct mutex *lock)
120 * See kernel/mutex.c for detailed documentation of these APIs. 120 * See kernel/mutex.c for detailed documentation of these APIs.
121 * Also see Documentation/mutex-design.txt. 121 * Also see Documentation/mutex-design.txt.
122 */ 122 */
123extern void fastcall mutex_lock(struct mutex *lock);
124extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock);
125
126#ifdef CONFIG_DEBUG_LOCK_ALLOC 123#ifdef CONFIG_DEBUG_LOCK_ALLOC
127extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 124extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
128extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, 125extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock,
129 unsigned int subclass); 126 unsigned int subclass);
127
128#define mutex_lock(lock) mutex_lock_nested(lock, 0)
129#define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
130#else 130#else
131extern void fastcall mutex_lock(struct mutex *lock);
132extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock);
133
131# define mutex_lock_nested(lock, subclass) mutex_lock(lock) 134# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
132# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) 135# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
133#endif 136#endif