aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/semaphore.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-03-14 13:19:33 -0400
committerMatthew Wilcox <willy@linux.intel.com>2008-04-17 10:42:40 -0400
commitf06d96865861c3dd01520f47e2e61c899db1631f (patch)
treed2fbd08af06a96b10192f7b27dd3ea2df1bb93d8 /include/linux/semaphore.h
parent64ac24e738823161693bf791f87adc802cf529ff (diff)
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 b3c691b089b..88f2a28cc0f 100644
--- a/include/linux/semaphore.h
+++ b/include/linux/semaphore.h
@@ -62,6 +62,12 @@ extern void down(struct semaphore *sem);
62extern int __must_check down_interruptible(struct semaphore *sem); 62extern int __must_check down_interruptible(struct semaphore *sem);
63 63
64/* 64/*
65 * As down_interruptible(), except the sleep may only be interrupted by
66 * signals which are fatal to this process.
67 */
68extern int __must_check down_killable(struct semaphore *sem);
69
70/*
65 * As down(), except this function will not sleep. It will return 0 if it 71 * As down(), except this function will not sleep. It will return 0 if it
66 * acquired the semaphore and 1 if the semaphore was contended. This 72 * acquired the semaphore and 1 if the semaphore was contended. This
67 * function may be called from any context, including interrupt and softirq. 73 * function may be called from any context, including interrupt and softirq.