MFC r279326:
Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
This commit is contained in:
parent
e4e2464970
commit
5458a77d46
@ -96,7 +96,7 @@ int
|
||||
mtx_trylock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
switch (pthread_mutex_lock(mtx)) {
|
||||
switch (pthread_mutex_trylock(mtx)) {
|
||||
case 0:
|
||||
return (thrd_success);
|
||||
case EBUSY:
|
||||
|
Loading…
x
Reference in New Issue
Block a user