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:
Konstantin Belousov 2015-02-26 16:39:57 +00:00
parent 544b31a3e3
commit 85e7eba604

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: