diff options
author | Matthew Wilcox <matthew@wil.cx> | 2008-03-14 13:19:33 -0400 |
---|---|---|
committer | Matthew Wilcox <willy@linux.intel.com> | 2008-04-17 10:42:40 -0400 |
commit | f06d96865861c3dd01520f47e2e61c899db1631f (patch) | |
tree | d2fbd08af06a96b10192f7b27dd3ea2df1bb93d8 /include/linux/semaphore.h | |
parent | 64ac24e738823161693bf791f87adc802cf529ff (diff) | |
download | lwn-f06d96865861c3dd01520f47e2e61c899db1631f.tar.gz lwn-f06d96865861c3dd01520f47e2e61c899db1631f.zip |
Introduce down_killable()
down_killable() is the functional counterpart of mutex_lock_killable.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Diffstat (limited to 'include/linux/semaphore.h')
-rw-r--r-- | include/linux/semaphore.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index b3c691b089b2..88f2a28cc0f1 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h @@ -62,6 +62,12 @@ extern void down(struct semaphore *sem); extern int __must_check down_interruptible(struct semaphore *sem); /* + * As down_interruptible(), except the sleep may only be interrupted by + * signals which are fatal to this process. + */ +extern int __must_check down_killable(struct semaphore *sem); + +/* * As down(), except this function will not sleep. It will return 0 if it * acquired the semaphore and 1 if the semaphore was contended. This * function may be called from any context, including interrupt and softirq. |