Implement mutex_lock_killable() in the LinuxKPI.
Submitted by: ashafer_badland.io (Austin Shafer) MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
3ff7ec1cc1
commit
1bbbe083a1
@ -66,6 +66,18 @@ typedef struct mutex {
|
||||
linux_mutex_lock_interruptible(_m); \
|
||||
})
|
||||
|
||||
/*
|
||||
* Reuse the interruptable method since the SX
|
||||
* lock handles both signals and interrupts:
|
||||
*/
|
||||
#define mutex_lock_killable(_m) ({ \
|
||||
MUTEX_SKIP() ? 0 : \
|
||||
linux_mutex_lock_interruptible(_m); \
|
||||
})
|
||||
|
||||
#define mutex_lock_killable_nested(_m, _sub) \
|
||||
mutex_lock_killable(_m)
|
||||
|
||||
#define mutex_unlock(_m) do { \
|
||||
if (MUTEX_SKIP()) \
|
||||
break; \
|
||||
|
Loading…
Reference in New Issue
Block a user