summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-02-26 16:39:57 +0000
committerkib <kib@FreeBSD.org>2015-02-26 16:39:57 +0000
commit448ebb9c59a69e417ded4fe181906305cb2ae4a4 (patch)
tree1290ed6195d9a852754e9a327425e152d1bbd893 /lib
parent4be3c8764016817f6db92dd567f6d84e6ba74967 (diff)
downloadFreeBSD-src-448ebb9c59a69e417ded4fe181906305cb2ae4a4.zip
FreeBSD-src-448ebb9c59a69e417ded4fe181906305cb2ae4a4.tar.gz
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
Diffstat (limited to 'lib')
-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