summaryrefslogtreecommitdiff
path: root/include/linux/semaphore.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-03-14 20:19:33 +0300
committerMatthew Wilcox <willy@linux.intel.com>2008-04-17 18:42:40 +0400
commitf06d96865861c3dd01520f47e2e61c899db1631f (patch)
treed2fbd08af06a96b10192f7b27dd3ea2df1bb93d8 /include/linux/semaphore.h
parent64ac24e738823161693bf791f87adc802cf529ff (diff)
downloadlinux-f06d96865861c3dd01520f47e2e61c899db1631f.tar.xz
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.h6
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.