diff options
author | Liam R. Howlett <howlett@gmail.com> | 2007-12-06 17:37:59 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@linux.intel.com> | 2007-12-06 17:37:59 -0500 |
commit | ad776537cc6b4b936cfd11893e7b698dfa072666 (patch) | |
tree | b553f03f34ce8750150765755abaaec27943fa0d /include | |
parent | 0b94e97a25d9b06ef17fca8da23169200bead1e2 (diff) |
Add mutex_lock_killable
Similar to mutex_lock_interruptible, it can be interrupted by a fatal
signal only.
Signed-off-by: Liam R. Howlett <howlett@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mutex.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 601479772b98..05c590352dd7 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -125,15 +125,20 @@ static inline int fastcall mutex_is_locked(struct mutex *lock) | |||
125 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 125 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
126 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, | 126 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, |
127 | unsigned int subclass); | 127 | unsigned int subclass); |
128 | extern int __must_check mutex_lock_killable_nested(struct mutex *lock, | ||
129 | unsigned int subclass); | ||
128 | 130 | ||
129 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) | 131 | #define mutex_lock(lock) mutex_lock_nested(lock, 0) |
130 | #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) | 132 | #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) |
133 | #define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0) | ||
131 | #else | 134 | #else |
132 | extern void fastcall mutex_lock(struct mutex *lock); | 135 | extern void fastcall mutex_lock(struct mutex *lock); |
133 | extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock); | 136 | extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock); |
137 | extern int __must_check fastcall mutex_lock_killable(struct mutex *lock); | ||
134 | 138 | ||
135 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) | 139 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) |
136 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) | 140 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) |
141 | # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) | ||
137 | #endif | 142 | #endif |
138 | 143 | ||
139 | /* | 144 | /* |