summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2014-09-26 04:33:27 +0000
committerpluknet <pluknet@FreeBSD.org>2014-09-26 04:33:27 +0000
commitf0e5f3d683f5f84b8732becc468828e23f59d837 (patch)
treea4673ed00be84ecdcf02d164bb14830ada06e7fa /lib
parent7165803bdb14ecb429fc730ee2dee9ff3d164e13 (diff)
downloadFreeBSD-src-f0e5f3d683f5f84b8732becc468828e23f59d837.zip
FreeBSD-src-f0e5f3d683f5f84b8732becc468828e23f59d837.tar.gz
Fix description of mutex acquisition.
Reviewed by: kib X-MFC with: r272070 Sponsored by: Nginx, Inc.
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/libthr.310
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libthr/libthr.3 b/lib/libthr/libthr.3
index a5b75d4..4b636ce 100644
--- a/lib/libthr/libthr.3
+++ b/lib/libthr/libthr.3
@@ -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.
OpenPOWER on IntegriCloud