svn commit: r279326 - head/lib/libstdthreads

Konstantin Belousov kib at FreeBSD.org
Thu Feb 26 16:39:58 UTC 2015


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 at 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:


More information about the svn-src-all mailing list