summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-03-05 09:01:46 +0000
committerkib <kib@FreeBSD.org>2015-03-05 09:01:46 +0000
commit5458a77d46feb51bae69352bb67c03d1dda25fb9 (patch)
tree1188fa84f655a8b38a119afe6f6d7b83aa453bc2
parente4e2464970c48040d2bc7a2b8dfe93e31f37ce84 (diff)
downloadFreeBSD-src-5458a77d46feb51bae69352bb67c03d1dda25fb9.zip
FreeBSD-src-5458a77d46feb51bae69352bb67c03d1dda25fb9.tar.gz
MFC r279326:
Use pthread_mutex_trylock(3) to implement mtx_trylock(3).
-rw-r--r--lib/libstdthreads/mtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libstdthreads/mtx.c b/lib/libstdthreads/mtx.c
index 6c9166d..f38fbae 100644
--- a/lib/libstdthreads/mtx.c
+++ b/lib/libstdthreads/mtx.c
@@ -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:
OpenPOWER on IntegriCloud