aux/os: Add os_mutex_trylock

This commit is contained in:
Moses Turner 2021-08-13 16:31:45 -05:00 committed by Jakob Bornecrantz
parent 7356100696
commit 0b2dd35b60

View file

@ -72,6 +72,12 @@ os_mutex_lock(struct os_mutex *om)
pthread_mutex_lock(&om->mutex);
}
static inline int
os_mutex_trylock(struct os_mutex *om)
{
return pthread_mutex_trylock(&om->mutex);
}
/*!
* Unlock.
*/