Introduce down_killable()
down_killable() is the functional counterpart of mutex_lock_killable. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
This commit is contained in:
parent
64ac24e738
commit
f06d968658
2 changed files with 28 additions and 0 deletions
|
|
@ -61,6 +61,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue