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:
Bartosz Kokoszko 2019-11-08 10:55:33 +01:00 committed by Liam Girdwood
parent 6071fb8dbf
commit b03e15a765
1 changed files with 2 additions and 2 deletions

View File

@ -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) \