Module Name: src Committed By: jruoho Date: Tue Apr 13 05:40:13 UTC 2010
Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile curproc.9 Log Message: Briefly note also curlwp. To generate a diff of this commit: cvs rdiff -u -r1.1426 -r1.1427 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.323 -r1.324 src/share/man/man9/Makefile cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/curproc.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1426 src/distrib/sets/lists/comp/mi:1.1427 --- src/distrib/sets/lists/comp/mi:1.1426 Mon Apr 12 22:38:36 2010 +++ src/distrib/sets/lists/comp/mi Tue Apr 13 05:40:12 2010 @@ -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 Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.323 src/share/man/man9/Makefile:1.324 --- src/share/man/man9/Makefile:1.323 Thu Mar 25 14:59:36 2010 +++ src/share/man/man9/Makefile Tue Apr 13 05:40:12 2010 @@ -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 \ Index: src/share/man/man9/curproc.9 diff -u src/share/man/man9/curproc.9:1.3 src/share/man/man9/curproc.9:1.4 --- src/share/man/man9/curproc.9:1.3 Wed Apr 30 13:10:58 2008 +++ src/share/man/man9/curproc.9 Tue Apr 13 05:40:12 2010 @@ -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