Platform API Reference
Platform portability layer
IotMutex_TryLock

Attempt to lock a mutex. Return immediately if the mutex is not available.

bool IotMutex_TryLock( IotMutex_t * pMutex );

If pMutex is available, this function immediately locks it and returns. Otherwise, this function returns without locking pMutex.

Parameters
[in]pMutexThe mutex to lock.
Returns
true if the mutex was successfully locked; false if the mutex was not available.
See also
IotMutex_Lock for a blocking lock.
IotMutex_t
_IotSystemMutex_t IotMutex_t
The type used to represent mutexes, configured with the type _IotSystemMutex_t.
Definition: iot_platform_types.h:75
IotMutex_TryLock
bool IotMutex_TryLock(IotMutex_t *pMutex)
Attempt to lock a mutex. Return immediately if the mutex is not available.