Module Name:    src
Committed By:   thorpej
Date:           Fri Feb  7 13:02:35 UTC 2020

Modified Files:
        src/share/man/man9: Makefile percpu.9

Log Message:
Document percpu_foreach_xcall().


To generate a diff of this commit:
cvs rdiff -u -r1.446 -r1.447 src/share/man/man9/Makefile
cvs rdiff -u -r1.13 -r1.14 src/share/man/man9/percpu.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/Makefile
diff -u src/share/man/man9/Makefile:1.446 src/share/man/man9/Makefile:1.447
--- src/share/man/man9/Makefile:1.446	Sat Feb  1 12:49:02 2020
+++ src/share/man/man9/Makefile	Fri Feb  7 13:02:35 2020
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.446 2020/02/01 12:49:02 riastradh Exp $
+#       $NetBSD: Makefile,v 1.447 2020/02/07 13:02:35 thorpej Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -667,7 +667,8 @@ MLINKS+=percpu.9 percpu_alloc.9 \
 	percpu.9 percpu_free.9 \
 	percpu.9 percpu_getref.9 \
 	percpu.9 percpu_putref.9 \
-	percpu.9 percpu_foreach.9
+	percpu.9 percpu_foreach.9 \
+	percpu.9 percpu_foreach_xcall.9
 MLINKS+=pfil.9 pfil_hook_get.9 \
 	pfil.9 pfil_add_hook.9 \
 	pfil.9 pfil_remove_hook.9 \

Index: src/share/man/man9/percpu.9
diff -u src/share/man/man9/percpu.9:1.13 src/share/man/man9/percpu.9:1.14
--- src/share/man/man9/percpu.9:1.13	Sat Feb  1 12:49:02 2020
+++ src/share/man/man9/percpu.9	Fri Feb  7 13:02:35 2020
@@ -1,4 +1,4 @@
-.\"     $NetBSD: percpu.9,v 1.13 2020/02/01 12:49:02 riastradh Exp $
+.\"     $NetBSD: percpu.9,v 1.14 2020/02/07 13:02:35 thorpej 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 January 29, 2020
+.Dd February 7, 2020
 .Dt PERCPU 9
 .Os
 .Sh NAME
@@ -37,7 +37,8 @@
 .Nm percpu_free ,
 .Nm percpu_getref ,
 .Nm percpu_putref ,
-.Nm percpu_foreach
+.Nm percpu_foreach ,
+.Nm percpu_foreach_xcall
 .Nd per-CPU storage allocator
 .Sh SYNOPSIS
 .In sys/percpu.h
@@ -54,6 +55,8 @@
 .Fn percpu_putref "percpu_t *pc"
 .Ft void
 .Fn percpu_foreach "percpu_t *pc" "percpu_callback_t cb" "void *arg"
+.Ft void
+.Fn percpu_foreach_xcall "percpu_t *pc" "u_int xcflags" "percpu_callback_t cb" "void *arg"
 .Sh DESCRIPTION
 The machine-independent
 .Nm
@@ -171,14 +174,30 @@ run
 The call to
 .Fa cb
 runs in the current thread; use
-.Xr xcall 9
-for cross-calls to run logic on other CPUs.
+.Fn percpu_foreach_xcall
+to to execute the call to
+.Fa cb
+on the remote CPUs.
 .Pp
 Must be used in thread context.
 .Fa cb
 .Em MUST NOT
 sleep except on adaptive locks, and should be fast.
 Do not rely on any particular order of iteration over the CPUs.
+.It Fn percpu_foreach_xcall "pc" "xcflags" "cb" "arg"
+Like
+.Fn percpu_foreach ,
+except the call to
+.Fa cb
+executes on the remote CPUs.
+The
+.Fa xcflags
+argument specifies how the cross calls are invoked; see
+.Xr xc_broadcast 9 .
+The same caveats and restrictions that apply to
+.Fn percpu_foreach
+also apply to
+.Fn percpu_foreach_xcall .
 .El
 .Sh CODE REFERENCES
 The

Reply via email to