diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/mutex.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/mutex.h')
-rw-r--r-- | include/linux/mutex.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index f363bc8fdc74..a940fe435aca 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -51,7 +51,7 @@ struct mutex { | |||
51 | spinlock_t wait_lock; | 51 | spinlock_t wait_lock; |
52 | struct list_head wait_list; | 52 | struct list_head wait_list; |
53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct thread_info *owner; | 54 | struct task_struct *owner; |
55 | #endif | 55 | #endif |
56 | #ifdef CONFIG_DEBUG_MUTEXES | 56 | #ifdef CONFIG_DEBUG_MUTEXES |
57 | const char *name; | 57 | const char *name; |
@@ -132,6 +132,7 @@ static inline int mutex_is_locked(struct mutex *lock) | |||
132 | */ | 132 | */ |
133 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 133 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
134 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 134 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
135 | extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock); | ||
135 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, | 136 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, |
136 | unsigned int subclass); | 137 | unsigned int subclass); |
137 | extern int __must_check mutex_lock_killable_nested(struct mutex *lock, | 138 | extern int __must_check mutex_lock_killable_nested(struct mutex *lock, |
@@ -140,6 +141,13 @@ extern int __must_check mutex_lock_killable_nested(struct mutex *lock, | |||
140 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) | 141 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) |
141 | #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) | 142 | #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) |
142 | #define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0) | 143 | #define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0) |
144 | |||
145 | #define mutex_lock_nest_lock(lock, nest_lock) \ | ||
146 | do { \ | ||
147 | typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \ | ||
148 | _mutex_lock_nest_lock(lock, &(nest_lock)->dep_map); \ | ||
149 | } while (0) | ||
150 | |||
143 | #else | 151 | #else |
144 | extern void mutex_lock(struct mutex *lock); | 152 | extern void mutex_lock(struct mutex *lock); |
145 | extern int __must_check mutex_lock_interruptible(struct mutex *lock); | 153 | extern int __must_check mutex_lock_interruptible(struct mutex *lock); |
@@ -148,6 +156,7 @@ extern int __must_check mutex_lock_killable(struct mutex *lock); | |||
148 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) | 156 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) |
149 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) | 157 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) |
150 | # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) | 158 | # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) |
159 | # define mutex_lock_nest_lock(lock, nest_lock) mutex_lock(lock) | ||
151 | #endif | 160 | #endif |
152 | 161 | ||
153 | /* | 162 | /* |
@@ -160,4 +169,8 @@ extern int mutex_trylock(struct mutex *lock); | |||
160 | extern void mutex_unlock(struct mutex *lock); | 169 | extern void mutex_unlock(struct mutex *lock); |
161 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 170 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
162 | 171 | ||
172 | #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX | ||
173 | #define arch_mutex_cpu_relax() cpu_relax() | ||
174 | #endif | ||
175 | |||
163 | #endif | 176 | #endif |