init_main.c (8d0f10857a48c0f5e04bf0cbe3d7443cb4f8051a) | init_main.c (367a13f905874f6ad0a5f78cb88a4923cfe86e5e) |
---|---|
1/*- 2 * Copyright (c) 1995 Terrence R. Lambert 3 * All rights reserved. 4 * 5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993 6 * The Regents of the University of California. All rights reserved. 7 * (c) UNIX System Laboratories, Inc. 8 * All or some portions of this file are derived from material licensed --- 817 unchanged lines hidden (view full) --- 826static void 827create_init(const void *udata __unused) 828{ 829 struct ucred *newcred, *oldcred; 830 struct thread *td; 831 int error; 832 833 error = fork1(&thread0, RFFDG | RFPROC | RFSTOPPED, 0, &initproc, | 1/*- 2 * Copyright (c) 1995 Terrence R. Lambert 3 * All rights reserved. 4 * 5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993 6 * The Regents of the University of California. All rights reserved. 7 * (c) UNIX System Laboratories, Inc. 8 * All or some portions of this file are derived from material licensed --- 817 unchanged lines hidden (view full) --- 826static void 827create_init(const void *udata __unused) 828{ 829 struct ucred *newcred, *oldcred; 830 struct thread *td; 831 int error; 832 833 error = fork1(&thread0, RFFDG | RFPROC | RFSTOPPED, 0, &initproc, |
834 NULL, 0); | 834 NULL, 0, NULL); |
835 if (error) 836 panic("cannot fork init: %d\n", error); 837 KASSERT(initproc->p_pid == 1, ("create_init: initproc->p_pid != 1")); 838 /* divorce init's credentials from the kernel's */ 839 newcred = crget(); 840 sx_xlock(&proctree_lock); 841 PROC_LOCK(initproc); 842 initproc->p_flag |= P_SYSTEM | P_INMEM; --- 36 unchanged lines hidden --- | 835 if (error) 836 panic("cannot fork init: %d\n", error); 837 KASSERT(initproc->p_pid == 1, ("create_init: initproc->p_pid != 1")); 838 /* divorce init's credentials from the kernel's */ 839 newcred = crget(); 840 sx_xlock(&proctree_lock); 841 PROC_LOCK(initproc); 842 initproc->p_flag |= P_SYSTEM | P_INMEM; --- 36 unchanged lines hidden --- |