diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-05-09 05:33:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:49 -0400 |
commit | 18d8362d517cb2bd97761294924fe6c2a6ee5e3c (patch) | |
tree | fff49e54cb725ba33ddf4453fb866838ad6ceeca /include/linux/mutex.h | |
parent | ae030e435f5400cff77c52506a8d3d7278f0947c (diff) |
mutex_lock_interruptible(): add __must_check
It's not sane to use mutex_lock_interruptible() and to then ignore the result.
Ditto down_interruptible(), but I'm lazy.
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mutex.h')
-rw-r--r-- | include/linux/mutex.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index b81bc2adaeff..0d50ea3df689 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -121,11 +121,12 @@ static inline int fastcall mutex_is_locked(struct mutex *lock) | |||
121 | * Also see Documentation/mutex-design.txt. | 121 | * Also see Documentation/mutex-design.txt. |
122 | */ | 122 | */ |
123 | extern void fastcall mutex_lock(struct mutex *lock); | 123 | extern void fastcall mutex_lock(struct mutex *lock); |
124 | extern int fastcall mutex_lock_interruptible(struct mutex *lock); | 124 | extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock); |
125 | 125 | ||
126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
128 | extern int mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass); | 128 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, |
129 | unsigned int subclass); | ||
129 | #else | 130 | #else |
130 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) | 131 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) |
131 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) | 132 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) |