Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Briefly note also curlwp.



details:   https://anonhg.NetBSD.org/src/rev/169be507ce6e
branches:  trunk
changeset: 753874:169be507ce6e
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Apr 13 05:40:12 2010 +0000

description:
Briefly note also curlwp.

diffstat:

 distrib/sets/lists/comp/mi |   5 ++++-
 share/man/man9/Makefile    |   4 ++--
 share/man/man9/curproc.9   |  46 ++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 44 insertions(+), 11 deletions(-)

diffs (122 lines):

diff -r 4be4fa8657fc -r 169be507ce6e distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Tue Apr 13 01:15:56 2010 +0000
+++ b/distrib/sets/lists/comp/mi        Tue Apr 13 05:40:12 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.1426 2010/04/12 22:38:36 pooka Exp $
+#      $NetBSD: mi,v 1.1427 2010/04/13 05:40:12 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -8859,6 +8859,7 @@
 ./usr/share/man/cat9/ctxsw.0                   comp-obsolete           obsolete
 ./usr/share/man/cat9/curcpu.0                  comp-sys-catman         .cat
 ./usr/share/man/cat9/curproc.0                 comp-sys-catman         .cat
+./usr/share/man/cat9/curlwp.0                  comp-sys-catman         .cat
 ./usr/share/man/cat9/cv.0                      comp-sys-catman         .cat
 ./usr/share/man/cat9/cv_broadcast.0            comp-sys-catman         .cat
 ./usr/share/man/cat9/cv_destroy.0              comp-sys-catman         .cat
@@ -14529,6 +14530,7 @@
 ./usr/share/man/html9/csf.html                 comp-sys-htmlman        html
 ./usr/share/man/html9/curcpu.html              comp-sys-htmlman        html
 ./usr/share/man/html9/curproc.html             comp-sys-htmlman        html
+./usr/share/man/html9/curlwp.html              comp-sys-htmlman        html
 ./usr/share/man/html9/cv.html                  comp-sys-htmlman        html
 ./usr/share/man/html9/cv_broadcast.html                comp-sys-htmlman        html
 ./usr/share/man/html9/cv_destroy.html          comp-sys-htmlman        html
@@ -20346,6 +20348,7 @@
 ./usr/share/man/man9/ctxsw.9                   comp-obsolete           obsolete
 ./usr/share/man/man9/curcpu.9                  comp-sys-man            .man
 ./usr/share/man/man9/curproc.9                 comp-sys-man            .man
+./usr/share/man/man9/curlwp.9                  comp-sys-man            .man
 ./usr/share/man/man9/cv.9                      comp-sys-man            .man
 ./usr/share/man/man9/cv_broadcast.9            comp-sys-man            .man
 ./usr/share/man/man9/cv_destroy.9              comp-sys-man            .man
diff -r 4be4fa8657fc -r 169be507ce6e share/man/man9/Makefile
--- a/share/man/man9/Makefile   Tue Apr 13 01:15:56 2010 +0000
+++ b/share/man/man9/Makefile   Tue Apr 13 05:40:12 2010 +0000
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.323 2010/03/25 14:59:36 jruoho Exp $
+#       $NetBSD: Makefile,v 1.324 2010/04/13 05:40:12 jruoho Exp $
 
 #      Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -223,7 +223,7 @@
        cpu_dumpconf.9 dumpsys.9
 MLINKS+=cpu_lwp_fork.9 child_return.9 cpu_lwp_fork.9 proc_trampoline.9
 MLINKS+=cpu_swapout.9 cpu_swapin.9
-MLINKS+=curproc.9 curcpu.9
+MLINKS+=curproc.9 curcpu.9 curproc.9 curlwp.9
 MLINKS+=delay.9 DELAY.9
 MLINKS+=disk.9 disk_attach.9 disk.9 disk_detach.9 \
        disk.9 disk_busy.9 disk.9 disk_unbusy.9 disk.9 disk_find.9 \
diff -r 4be4fa8657fc -r 169be507ce6e share/man/man9/curproc.9
--- a/share/man/man9/curproc.9  Tue Apr 13 01:15:56 2010 +0000
+++ b/share/man/man9/curproc.9  Tue Apr 13 05:40:12 2010 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: curproc.9,v 1.3 2008/04/30 13:10:58 martin Exp $
+.\"     $NetBSD: curproc.9,v 1.4 2010/04/13 05:40:12 jruoho Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,24 +27,54 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 23, 2002
+.Dd April 13, 2010
 .Dt CURPROC 9
 .Os
 .Sh NAME
 .Nm curproc ,
-.Nm curcpu
-.Nd current process and processor
+.Nm curcpu ,
+.Nm curlwp
+.Nd current process, processor, and
+.Tn LWP
 .Sh SYNOPSIS
 .In sys/proc.h
 .Ft struct cpu_info *
 .Fn curcpu "void"
 .Ft struct proc *
 .Fn curproc "void"
+.Ft struct lwp *
+.Fn curlwp "void"
 .Sh DESCRIPTION
+The following macros can be used to retrieve
+the current processor, process, and light-weight process
+.Pq Tn LWP ,
+respectively:
+.Bl -enum -offset indent
+.It
+The machine-dependent
 .Fn curcpu
-returns a pointer to a
+macro returns a pointer to a
 .Em cpu_info
-structure containing information of the CPU that this thread is
-running on.
+structure containing information of the
+.Tn CPU
+that this thread is running on.
+.It
+The machine-independent
 .Fn curproc
-returns a pointer to the process currently running on this CPU.
+macro refers to a pointer to the process currently running on this
+.Tn CPU .
+.It
+The
+.Fn curlwp
+macro expands to a pointer to
+.Em lwp
+structure, containing information about the current
+.Tn LWP .
+This macro is machine-independent,
+but machine-dependent
+.In machine/cpu.h
+may redefine it.
+.El
+.Sh SEE ALSO
+.Xr cpu_number 9 ,
+.Xr pfind 9



Home | Main Index | Thread Index | Old Index