mutex_try_enter() function
Attempt to take ownership of a mutex If the mutex wasn't owned, this will claim the mutex for the caller and return true. Otherwise (if the mutex was already owned) this will return false and the caller will NOT own the mutex.
Arguments
mtx
Pointer to mutex structure
owner_out
If mutex was already owned, and this pointer is non-zero, it will be filled in with the owner id of the current owner of the mutex
Return value
true if mutex now owned, false otherwise
![]()
if (!mutex_try_enter(mtx, &owner)) {
mutex_try_enter() is called by 2 functions and calls 4 functions:
![]()
mutex_try_enter()
mutex_try_enter() reads 3 variables and writes 1 variable:
![]()
mutex_try_enter()