mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-03 12:28:07 +00:00
aux/os: Add os_mutex_trylock
This commit is contained in:
parent
7356100696
commit
0b2dd35b60
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue