AWS IoT Device SDK C: Platform
Platform portability layer
Return to main page ↑
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.