Date: Thu, 26 Feb 2015 16:39:57 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279326 - head/lib/libstdthreads Message-ID: <201502261639.t1QGdvsu087151@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Feb 26 16:39:57 2015 New Revision: 279326 URL: https://svnweb.freebsd.org/changeset/base/279326 Log: 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 Modified: head/lib/libstdthreads/mtx.c Modified: head/lib/libstdthreads/mtx.c ============================================================================== --- head/lib/libstdthreads/mtx.c Thu Feb 26 16:05:09 2015 (r279325) +++ head/lib/libstdthreads/mtx.c Thu Feb 26 16:39:57 2015 (r279326) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502261639.t1QGdvsu087151>