mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Add mutex_lock_killable
Similar to mutex_lock_interruptible, it can be interrupted by a fatal signal only. Signed-off-by: Liam R. Howlett <howlett@gmail.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
This commit is contained in:
parent
0b94e97a25
commit
ad776537cc
2 changed files with 38 additions and 3 deletions
|
@ -125,15 +125,20 @@ static inline int fastcall mutex_is_locked(struct mutex *lock)
|
|||
extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
|
||||
extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock,
|
||||
unsigned int subclass);
|
||||
extern int __must_check mutex_lock_killable_nested(struct mutex *lock,
|
||||
unsigned int subclass);
|
||||
|
||||
#define mutex_lock(lock) mutex_lock_nested(lock, 0)
|
||||
#define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
|
||||
#define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0)
|
||||
#else
|
||||
extern void fastcall mutex_lock(struct mutex *lock);
|
||||
extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock);
|
||||
extern int __must_check fastcall mutex_lock_killable(struct mutex *lock);
|
||||
|
||||
# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
|
||||
# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
|
||||
# define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue