Deleted Added
full compact
init_main.c (42379) init_main.c (43208)
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

--- 25 unchanged lines hidden (view full) ---

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
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

--- 25 unchanged lines hidden (view full) ---

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
42 * $Id: init_main.c,v 1.102 1998/12/30 10:38:58 dfr Exp $
42 * $Id: init_main.c,v 1.103 1999/01/07 21:23:39 julian Exp $
43 */
44
45#include "opt_devfs.h"
46
47#include <sys/param.h>
48#include <sys/file.h>
49#include <sys/filedesc.h>
50#include <sys/kernel.h>

--- 27 unchanged lines hidden (view full) ---

78extern void __main __P((void));
79extern void main __P((void *framep));
80
81/* Components of the first process -- never freed. */
82static struct session session0;
83static struct pgrp pgrp0;
84struct proc proc0;
85static struct pcred cred0;
43 */
44
45#include "opt_devfs.h"
46
47#include <sys/param.h>
48#include <sys/file.h>
49#include <sys/filedesc.h>
50#include <sys/kernel.h>

--- 27 unchanged lines hidden (view full) ---

78extern void __main __P((void));
79extern void main __P((void *framep));
80
81/* Components of the first process -- never freed. */
82static struct session session0;
83static struct pgrp pgrp0;
84struct proc proc0;
85static struct pcred cred0;
86#ifdef COMPAT_LINUX_THREADS
87static struct procsig procsig0;
86static struct procsig procsig0;
88#endif /* COMPAT_LINUX_THREADS */
89static struct filedesc0 filedesc0;
90static struct plimit limit0;
91static struct vmspace vmspace0;
92struct proc *initproc;
93
94int cmask = CMASK;
95extern struct user *proc0paddr;
96

--- 316 unchanged lines hidden (view full) ---

413 bcopy("swapper", p->p_comm, sizeof ("swapper"));
414
415 /* Create credentials. */
416 cred0.p_refcnt = 1;
417 p->p_cred = &cred0;
418 p->p_ucred = crget();
419 p->p_ucred->cr_ngroups = 1; /* group 0 */
420
87static struct filedesc0 filedesc0;
88static struct plimit limit0;
89static struct vmspace vmspace0;
90struct proc *initproc;
91
92int cmask = CMASK;
93extern struct user *proc0paddr;
94

--- 316 unchanged lines hidden (view full) ---

411 bcopy("swapper", p->p_comm, sizeof ("swapper"));
412
413 /* Create credentials. */
414 cred0.p_refcnt = 1;
415 p->p_cred = &cred0;
416 p->p_ucred = crget();
417 p->p_ucred->cr_ngroups = 1; /* group 0 */
418
421#ifdef COMPAT_LINUX_THREADS
422 /* Create procsig. */
423 p->p_procsig = &procsig0;
424 p->p_procsig->ps_refcnt = 2;
425
419 /* Create procsig. */
420 p->p_procsig = &procsig0;
421 p->p_procsig->ps_refcnt = 2;
422
426#endif /* COMPAT_LINUX_THREADS */
427 /* Create the file descriptor table. */
428 fdp = &filedesc0;
429 p->p_fd = &fdp->fd_fd;
430 fdp->fd_fd.fd_refcnt = 1;
431 fdp->fd_fd.fd_cmask = cmask;
432 fdp->fd_fd.fd_ofiles = fdp->fd_dfiles;
433 fdp->fd_fd.fd_ofileflags = fdp->fd_dfileflags;
434 fdp->fd_fd.fd_nfiles = NDFILE;

--- 264 unchanged lines hidden ---
423 /* Create the file descriptor table. */
424 fdp = &filedesc0;
425 p->p_fd = &fdp->fd_fd;
426 fdp->fd_fd.fd_refcnt = 1;
427 fdp->fd_fd.fd_cmask = cmask;
428 fdp->fd_fd.fd_ofiles = fdp->fd_dfiles;
429 fdp->fd_fd.fd_ofileflags = fdp->fd_dfileflags;
430 fdp->fd_fd.fd_nfiles = NDFILE;

--- 264 unchanged lines hidden ---