From owner-svn-src-all@FreeBSD.ORG Fri Sep 26 04:33:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4799C7B3; Fri, 26 Sep 2014 04:33:28 +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 338026BF; Fri, 26 Sep 2014 04:33:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8Q4XSfV015110; Fri, 26 Sep 2014 04:33:28 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8Q4XSNi015109; Fri, 26 Sep 2014 04:33:28 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201409260433.s8Q4XSNi015109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Fri, 26 Sep 2014 04:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272153 - head/lib/libthr 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: Fri, 26 Sep 2014 04:33:28 -0000 Author: pluknet Date: Fri Sep 26 04:33:27 2014 New Revision: 272153 URL: http://svnweb.freebsd.org/changeset/base/272153 Log: Fix description of mutex acquisition. Reviewed by: kib X-MFC with: r272070 Sponsored by: Nginx, Inc. Modified: head/lib/libthr/libthr.3 Modified: head/lib/libthr/libthr.3 ============================================================================== --- head/lib/libthr/libthr.3 Fri Sep 26 03:03:58 2014 (r272152) +++ head/lib/libthr/libthr.3 Fri Sep 26 04:33:27 2014 (r272153) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2014 +.Dd September 26, 2014 .Dt LIBTHR 3 .Os .Sh NAME @@ -85,8 +85,14 @@ owning the lock. .Nm performs a contested mutex acquisition in three stages, each of which is more resource-consuming than the previous. +The first two stages are only applied for a mutex of +.Dv PTHREAD_MUTEX_ADAPTIVE_NP +type and +.Dv PTHREAD_PRIO_NONE +protocol (see +.Xr pthread_mutexattr 3 ) . .Pp -First, a spin loop +First, on SMP systems, a spin loop is performed, where the library attempts to acquire the lock by .Xr atomic 9 operations.