diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-06-29 20:56:22 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-13 11:01:41 -0500 |
commit | 0156e6423e57b028fec214309816e7712d14032c (patch) | |
tree | e88f6c1f682a2c52401a6bf1d3f1eceb155d4e88 /include/linux/mutex.h | |
parent | e5ae1518d2f6328f1039350ac95ed1f9ef3fce65 (diff) |
rt-add-rt-to-mutex-headers.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/mutex.h')
-rw-r--r-- | include/linux/mutex.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 9121595a8ebf..bdf1da2cf4b6 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -17,6 +17,17 @@ #include <linux/atomic.h> +#ifdef CONFIG_DEBUG_LOCK_ALLOC +# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ + , .dep_map = { .name = #lockname } +#else +# define __DEP_MAP_MUTEX_INITIALIZER(lockname) +#endif + +#ifdef CONFIG_PREEMPT_RT_FULL +# include <linux/mutex_rt.h> +#else + /* * Simple, straightforward mutexes with strict semantics: * @@ -95,13 +106,6 @@ do { \ static inline void mutex_destroy(struct mutex *lock) {} #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ - , .dep_map = { .name = #lockname } -#else -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) -#endif - #define __MUTEX_INITIALIZER(lockname) \ { .count = ATOMIC_INIT(1) \ , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ @@ -167,6 +171,9 @@ extern int __must_check mutex_lock_killable(struct mutex *lock); */ extern int mutex_trylock(struct mutex *lock); extern void mutex_unlock(struct mutex *lock); + +#endif /* !PREEMPT_RT_FULL */ + extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX |