MFC r279326:

Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
This commit is contained in:
Konstantin Belousov 2015-03-05 09:01:46 +00:00
parent 6ebf6f59dc
commit 5982e1b66f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=279632

View File

@ -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: