Module Name:    src
Committed By:   martin
Date:           Mon May 12 08:47:49 UTC 2014

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

Log Message:
Belatedly adapt to changes in the code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/pcu.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/pcu.9
diff -u src/share/man/man9/pcu.9:1.4 src/share/man/man9/pcu.9:1.5
--- src/share/man/man9/pcu.9:1.4	Thu Jan 23 16:35:20 2014
+++ src/share/man/man9/pcu.9	Mon May 12 08:47:49 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pcu.9,v 1.4 2014/01/23 16:35:20 skrll Exp $
+.\"	$NetBSD: pcu.9,v 1.5 2014/05/12 08:47:49 martin Exp $
 .\"
 .\" Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -58,19 +58,39 @@ Members of
 are
 .Bd -literal
         u_int	pcu_id;
-        void	(*pcu_state_save)(lwp_t *l);
-        void	(*pcu_state_load)(lwp_t *l, bool used);
-        void	(*pcu_state_release)(lwp_t *l);
+        void	(*pcu_state_save)(lwp_t *l, u_int flags);
+        void	(*pcu_state_load)(lwp_t *l, u_int flags);
+        void	(*pcu_state_release)(lwp_t *l, u_int flags);
 .Ed
 .Pp
+The PCU operations take a
+.Ar flags
+parameter which is a bitmask that always can have one of the general
+bits set:
+.Bl -tag -width PCU_KERNEL
+.It PCU_USER
+PCU state is for the user
+.It PCU_KERNEL
+PCU state is for the kernel
+.El
+.Pp
 .Bl -tag -width compact
 .It Fn pcu_state_save
 save the current CPU's state into the given LWP's MD storage.
 .It Fn pcu_state_load
 load PCU state from the given LWP's MD storage to the current CPU.
 The
-.Ar used
-argument is true if it is not the first time the LWP uses the PCU.
+.Ar flags
+is a combination of the above general flags and one or more of
+the following:
+.Bl -tag -width PCU_LOADED
+.It PCU_RELOAD
+Load registers into the PCU
+.It PCU_ENABLE
+Enable the PCU
+.It PCU_LOADED
+the current LWP has used this PCU before
+.El
 .It Fn pcu_state_release
 indicate to MD code that the PCU ownership by the LWP was released,
 therefore the next use of PCU on the LWP shall be detected and

Reply via email to