mirror of https://github.com/thesofproject/sof.git
spinlock: add return value to spin_try_lock macro
Adds return to spin_try_lock() in order to retrieve status from arch_try_lock() function. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
parent
6071fb8dbf
commit
b03e15a765
|
@ -189,10 +189,10 @@ extern uint32_t lock_dbg_user[DBG_LOCK_USERS];
|
|||
arch_spin_lock(lock); \
|
||||
} while (0)
|
||||
|
||||
#define spin_try_lock(lock) \
|
||||
#define spin_try_lock(lock, ret) \
|
||||
do { \
|
||||
spin_lock_dbg(); \
|
||||
arch_try_lock(lock); \
|
||||
ret = arch_try_lock(lock); \
|
||||
} while (0)
|
||||
|
||||
#define spin_unlock(lock) \
|
||||
|
|
Loading…
Reference in New Issue