Module Name:    src
Committed By:   riastradh
Date:           Sat Feb  1 13:35:12 UTC 2020

Modified Files:
        src/share/man/man9: xcall.9

Log Message:
Redocument xc_barrier.

Be more clearer, and more correcter, about what it does.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/xcall.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/xcall.9
diff -u src/share/man/man9/xcall.9:1.16 src/share/man/man9/xcall.9:1.17
--- src/share/man/man9/xcall.9:1.16	Sat Nov 30 02:22:23 2019
+++ src/share/man/man9/xcall.9	Sat Feb  1 13:35:11 2020
@@ -1,4 +1,4 @@
-.\"     $NetBSD: xcall.9,v 1.16 2019/11/30 02:22:23 riastradh Exp $
+.\"     $NetBSD: xcall.9,v 1.17 2020/02/01 13:35:11 riastradh Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 29, 2019
+.Dd February 1, 2020
 .Dt XCALL 9
 .Os
 .Sh NAME
@@ -97,7 +97,7 @@ Functions being called should be relativ
 They may block on locks, but carefully and minimally, to not interfere
 with other cross calls in the system.
 .Sh FUNCTIONS
-.Bl -tag -width Fn
+.Bl -tag -width abcd
 .It Fn xc_broadcast "flags" "func" "arg1" "arg2"
 Call
 .Pf (* Fa func\| ) Ns Fo ""
@@ -147,19 +147,33 @@ for the corresponding cross-call to comp
 .Fn xc_wait
 should be called from a thread context.
 .It Fn xc_barrier "flags"
-Issue a broadcast cross-call that does nothing, using
-.Fa flags ,
+Issue a broadcast cross-call that does nothing,
 and wait for it to complete.
-This has two effects:
+.Pp
+This functions like a memory barrier that forces all prior operations
+in program order to globally happen before all subsequent operations in
+program order, as witnessed by every CPU.
+.Pp
+This additionally waits for all higher-priority activity on the CPU to
+complete, according to
+.Fa flags :
 .Bl -dash -compact
 .It
-This waits for the interrupt priority level to transition to
+.Fo xc_barrier
+.Li 0
+.Fc
+waits for any pending
+.Xr kpreempt_disable 9
+sections or activity at interrupt priority level above
 .Dv IPL_NONE
-at least once on all CPUs.
+to finish on all CPUs.
 .It
-This functions like a memory barrier that forces all prior operations
-in program order to globally happen before all subsequent operations in
-program order, as witnessed by every CPU.
+.Fo xc_barrier
+.Dv XC_HIGHPRI_IPL\| Ns Fn "" ipl
+.Fc
+waits for any pending activity at the software interrupt priority level
+.Fa ipl
+or higher to finish on all CPUs.
 .El
 .Pp
 .Fn xc_barrier

Reply via email to