Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
Noted and tested by: Vineela <vineela_17@yahoo.com> PR: 198050 Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
544b31a3e3
commit
85e7eba604
@ -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…
Reference in New Issue
Block a user