Module Name: src Committed By: jruoho Date: Thu Jul 1 14:54:44 UTC 2010
Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man9: Makefile Added Files: src/share/man/man9: proc_find.9 Log Message: Briefly document proc_find() and pgrp_find(). To generate a diff of this commit: cvs rdiff -u -r1.1476 -r1.1477 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.334 -r1.335 src/share/man/man9/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man9/proc_find.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.1476 src/distrib/sets/lists/comp/mi:1.1477 --- src/distrib/sets/lists/comp/mi:1.1476 Thu Jul 1 14:22:12 2010 +++ src/distrib/sets/lists/comp/mi Thu Jul 1 14:54:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1476 2010/07/01 14:22:12 jruoho Exp $ +# $NetBSD: mi,v 1.1477 2010/07/01 14:54:44 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -9439,6 +9439,7 @@ ./usr/share/man/cat9/pfind.0 comp-obsolete obsolete ./usr/share/man/cat9/pg_find.0 comp-obsolete obsolete ./usr/share/man/cat9/pgfind.0 comp-obsolete obsolete +./usr/share/man/cat9/pgrp_find.0 comp-sys-catman .cat ./usr/share/man/cat9/pgsignal.0 comp-sys-catman .cat ./usr/share/man/cat9/physio.0 comp-sys-catman .cat ./usr/share/man/cat9/pmap.0 comp-sys-catman .cat @@ -9507,6 +9508,7 @@ ./usr/share/man/cat9/preempt.0 comp-sys-catman .cat ./usr/share/man/cat9/printf.0 comp-sys-catman .cat ./usr/share/man/cat9/printf_nolog.0 comp-sys-catman .cat +./usr/share/man/cat9/proc_find.0 comp-sys-catman .cat ./usr/share/man/cat9/proc_trampoline.0 comp-sys-catman .cat ./usr/share/man/cat9/profhz.0 comp-sys-catman .cat ./usr/share/man/cat9/prop_array_copyin_ioctl.0 comp-sys-catman .cat @@ -15184,6 +15186,7 @@ ./usr/share/man/html9/pfind.html comp-obsolete obsolete ./usr/share/man/html9/pg_find.html comp-obsolete obsolete ./usr/share/man/html9/pgfind.html comp-obsolete obsolete +./usr/share/man/html9/pgrp_find.html comp-sys-htmlman html ./usr/share/man/html9/pgsignal.html comp-sys-htmlman html ./usr/share/man/html9/physio.html comp-sys-htmlman html ./usr/share/man/html9/pmap.html comp-sys-htmlman html @@ -15252,6 +15255,7 @@ ./usr/share/man/html9/preempt.html comp-sys-htmlman html ./usr/share/man/html9/printf.html comp-sys-htmlman html ./usr/share/man/html9/printf_nolog.html comp-sys-htmlman html +./usr/share/man/html9/proc_find.html comp-sys-htmlman html ./usr/share/man/html9/proc_trampoline.html comp-sys-htmlman html ./usr/share/man/html9/profhz.html comp-sys-htmlman html ./usr/share/man/html9/prop_array_copyin_ioctl.html comp-sys-htmlman html @@ -21098,6 +21102,7 @@ ./usr/share/man/man9/pfind.9 comp-obsolete obsolete ./usr/share/man/man9/pg_find.9 comp-obsolete obsolete ./usr/share/man/man9/pgfind.9 comp-obsolete obsolete +./usr/share/man/man9/pgrp_find.9 comp-sys-man .man ./usr/share/man/man9/pgsignal.9 comp-sys-man .man ./usr/share/man/man9/physio.9 comp-sys-man .man ./usr/share/man/man9/pmap.9 comp-sys-man .man @@ -21166,6 +21171,7 @@ ./usr/share/man/man9/preempt.9 comp-sys-man .man ./usr/share/man/man9/printf.9 comp-sys-man .man ./usr/share/man/man9/printf_nolog.9 comp-sys-man .man +./usr/share/man/man9/proc_find.9 comp-sys-man .man ./usr/share/man/man9/proc_trampoline.9 comp-sys-man .man ./usr/share/man/man9/profhz.9 comp-sys-man .man ./usr/share/man/man9/prop_array_copyin_ioctl.9 comp-sys-man .man Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.334 src/share/man/man9/Makefile:1.335 --- src/share/man/man9/Makefile:1.334 Fri Jun 25 15:16:14 2010 +++ src/share/man/man9/Makefile Thu Jul 1 14:54:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.334 2010/06/25 15:16:14 tsutsui Exp $ +# $NetBSD: Makefile,v 1.335 2010/07/01 14:54:44 jruoho Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -38,9 +38,9 @@ mstohz.9 mutex.9 m_tag.9 namecache.9 \ namei.9 opencrypto.9 optstr.9 \ panic.9 pci.9 pci_configure_bus.9 pci_intr.9 pckbport.9 \ - pcmcia.9 pcq.9 percpu.9 pfil.9 pfind.9 physio.9 pmap.9 pmatch.9 \ + pcmcia.9 pcq.9 percpu.9 pfil.9 physio.9 pmap.9 pmatch.9 \ pmc.9 pmf.9 pool.9 pool_cache.9 powerhook_establish.9 ppsratecheck.9 \ - preempt.9 putter.9 \ + preempt.9 proc_find.9 putter.9 \ radio.9 ras.9 rasops.9 ratecheck.9 resettodr.9 rnd.9 roundup.9 \ rssadapt.9 rt_timer.9 rwlock.9 RUN_ONCE.9 \ sched_4bsd.9 sched_m2.9 scsipi.9 \ @@ -371,6 +371,7 @@ MLINKS+=kpreempt.9 kpreempt_disable.9 \ kpreempt.9 kpreempt_disabled.9 \ kpreempt.9 kpreempt_enable.9 +MLINKS+=proc_find.9 pgrp_find.9 MLINKS+=kprintf.9 printf.9 kprintf.9 printf_nolog.9 kprintf.9 sprintf.9 \ kprintf.9 snprintf.9 kprintf.9 vprintf.9 kprintf.9 vsprintf.9 \ kprintf.9 vsnprintf.9 kprintf.9 uprintf.9 kprintf.9 ttyprintf.9 \ @@ -541,9 +542,6 @@ pfil.9 pfil_head_unregister.9 \ pfil.9 pfil_head_get.9 \ pfil.9 pfil_run_hooks.9 -MLINKS+=pfind.9 p_find.9 \ - pfind.9 pg_find.9 \ - pfind.9 pgfind.9 MLINKS+=pmc.9 pmc_get_num_counters.9 \ pmc.9 pmc_get_counter_type.9 \ pmc.9 pmc_save_context.9 \ Added files: Index: src/share/man/man9/proc_find.9 diff -u /dev/null src/share/man/man9/proc_find.9:1.1 --- /dev/null Thu Jul 1 14:54:45 2010 +++ src/share/man/man9/proc_find.9 Thu Jul 1 14:54:44 2010 @@ -0,0 +1,71 @@ +.\" $NetBSD: proc_find.9,v 1.1 2010/07/01 14:54:44 jruoho Exp $ +.\" +.\" Copyright (c) 2010 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Jukka Ruohonen. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd July 1, 2010 +.Dt PROC_FIND 9 +.Os +.Sh NAME +.Nm proc_find , +.Nm pgrp_find +.Nd find process or process group +.Sh SYNOPSIS +.In sys/proc.h +.Ft struct proc * +.Fn proc_find "pid_t pid" +.Ft struct pgrp * +.Fn pgrp_find "pid_t pgid" +.Pp +.Va extern kmutex_t *proc_lock; +.Sh DESCRIPTION +The +.Fn proc_find +and +.Fn pgrp_find +functions retrieve process and process group structures from process +.Tn ID +.Fa pid +and process group +.Tn ID +.Fa pgid . +Both functions must be called by holding a +.Xr mutex 9 +on +.Va proc_lock . +.Sh RETURN VALUES +Upon successful completion, the described functions return a pointer to either +.Em struct proc +or +.Em struct pgrp . +Otherwise, if the requested +.Tn ID +was not found, +.Dv NULL +is returned. +.Sh SEE ALSO +.Xr curproc 9