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
4be3c87640
commit
448ebb9c59
@ -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