Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 2015 09:01:47 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r279632 - stable/10/lib/libstdthreads
Message-ID:  <201503050901.t2591lqb025940@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Mar  5 09:01:46 2015
New Revision: 279632
URL: https://svnweb.freebsd.org/changeset/base/279632

Log:
  MFC r279326:
  Use pthread_mutex_trylock(3) to implement mtx_trylock(3).

Modified:
  stable/10/lib/libstdthreads/mtx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstdthreads/mtx.c
==============================================================================
--- stable/10/lib/libstdthreads/mtx.c	Thu Mar  5 09:00:27 2015	(r279631)
+++ stable/10/lib/libstdthreads/mtx.c	Thu Mar  5 09:01:46 2015	(r279632)
@@ -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?201503050901.t2591lqb025940>