1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 |
39 * $FreeBSD: head/sys/kern/kern_fork.c 74912 2001-03-28 09:03:24Z jhb $ |
40 */ 41 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> 47#include <sys/filedesc.h> 48#include <sys/kernel.h> 49#include <sys/sysctl.h> |
50#include <sys/lock.h> |
51#include <sys/malloc.h> 52#include <sys/mutex.h> 53#include <sys/proc.h> 54#include <sys/resourcevar.h> 55#include <sys/syscall.h> 56#include <sys/vnode.h> 57#include <sys/acct.h> 58#include <sys/ktr.h> 59#include <sys/ktrace.h> 60#include <sys/kthread.h> 61#include <sys/unistd.h> 62#include <sys/jail.h> 63#include <sys/sx.h> 64 65#include <vm/vm.h> |
66#include <vm/pmap.h> 67#include <vm/vm_map.h> 68#include <vm/vm_extern.h> 69#include <vm/vm_zone.h> 70 71#include <sys/vmmeter.h> 72#include <sys/user.h> 73 --- 445 unchanged lines hidden (view full) --- 519 PROCTREE_LOCK(PT_EXCLUSIVE); 520 PROC_LOCK(p2); 521 p2->p_pptr = pptr; 522 PROC_UNLOCK(p2); 523 LIST_INSERT_HEAD(&pptr->p_children, p2, p_sibling); 524 PROCTREE_LOCK(PT_RELEASE); 525 PROC_LOCK(p2); 526 LIST_INIT(&p2->p_children); |
527 LIST_INIT(&p2->p_contested); 528 529 callout_init(&p2->p_itcallout, 0); 530 callout_init(&p2->p_slpcallout, 1); 531 532 PROC_LOCK(p1); 533#ifdef KTRACE 534 /* --- 238 unchanged lines hidden --- |