From owner-svn-src-all@FreeBSD.ORG Thu Feb 26 16:39:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6080BC5; Thu, 26 Feb 2015 16:39:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1353F8F; Thu, 26 Feb 2015 16:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1QGdvNj087152; Thu, 26 Feb 2015 16:39:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1QGdvsu087151; Thu, 26 Feb 2015 16:39:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502261639.t1QGdvsu087151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 26 Feb 2015 16:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279326 - head/lib/libstdthreads X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 16:39:58 -0000 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 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: