From owner-svn-src-all@FreeBSD.ORG Sat Jun 20 17:18:46 2015 Return-Path: Delivered-To: svn-src-all@hub.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 D5A54D34; Sat, 20 Jun 2015 17:18:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) 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 C3FD2832; Sat, 20 Jun 2015 17:18:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5KHIk15056427; Sat, 20 Jun 2015 17:18:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5KHIkM2056426; Sat, 20 Jun 2015 17:18:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506201718.t5KHIkM2056426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 Jun 2015 17:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284646 - head/share/man/man9 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.20 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: Sat, 20 Jun 2015 17:18:47 -0000 Author: kib Date: Sat Jun 20 17:18:46 2015 New Revision: 284646 URL: https://svnweb.freebsd.org/changeset/base/284646 Log: The barriers, provided by _acq and _rel atomics, are acquire and release barriers, not read and write barriers. They fence all memory accesses from the respective side, not limited by the kind of operation. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/share/man/man9/atomic.9 Modified: head/share/man/man9/atomic.9 ============================================================================== --- head/share/man/man9/atomic.9 Sat Jun 20 15:55:53 2015 (r284645) +++ head/share/man/man9/atomic.9 Sat Jun 20 17:18:46 2015 (r284646) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2013 +.Dd June 20, 2015 .Dt ATOMIC 9 .Os .Sh NAME @@ -123,7 +123,9 @@ The first form just performs the operati The second form uses a read memory barrier, and the third variant uses a write memory barrier. .Pp -The second variant of each operation includes a read memory barrier. +The second variant of each operation includes an +.Em acquire +memory barrier. This barrier ensures that the effects of this operation are completed before the effects of any later data accesses. As a result, the operation is said to have acquire semantics as it acquires a @@ -137,7 +139,9 @@ For example, to subtract two integers en happen after the subtraction is performed, use .Fn atomic_subtract_acq_int . .Pp -The third variant of each operation includes a write memory barrier. +The third variant of each operation includes a +.Em release +memory barrier. This ensures that all effects of all previous data accesses are completed before this operation takes place. As a result, the operation is said to have release semantics as it releases