minor KNF
This commit is contained in:
parent
0a4ef18ab8
commit
4637391f86
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_exit.c,v 1.88 2001/02/10 05:05:27 thorpej Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.89 2001/02/26 21:09:57 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -126,7 +126,7 @@ int
|
||||
sys_exit(struct proc *p, void *v, register_t *retval)
|
||||
{
|
||||
struct sys_exit_args /* {
|
||||
syscallarg(int) rval;
|
||||
syscallarg(int) rval;
|
||||
} */ *uap = v;
|
||||
|
||||
exit1(p, W_EXITCODE(SCARG(uap, rval), 0));
|
||||
@ -142,8 +142,8 @@ sys_exit(struct proc *p, void *v, register_t *retval)
|
||||
void
|
||||
exit1(struct proc *p, int rv)
|
||||
{
|
||||
struct proc *q, *nq;
|
||||
int s;
|
||||
struct proc *q, *nq;
|
||||
int s;
|
||||
|
||||
if (__predict_false(p == initproc))
|
||||
panic("init died (signal %d, exit %d)",
|
||||
@ -399,21 +399,20 @@ int
|
||||
sys_wait4(struct proc *q, void *v, register_t *retval)
|
||||
{
|
||||
struct sys_wait4_args /* {
|
||||
syscallarg(int) pid;
|
||||
syscallarg(int *) status;
|
||||
syscallarg(int) options;
|
||||
syscallarg(struct rusage *) rusage;
|
||||
syscallarg(int) pid;
|
||||
syscallarg(int *) status;
|
||||
syscallarg(int) options;
|
||||
syscallarg(struct rusage *) rusage;
|
||||
} */ *uap = v;
|
||||
int nfound;
|
||||
struct proc *p, *t;
|
||||
int status, error, s;
|
||||
struct proc *p, *t;
|
||||
int nfound, status, error, s;
|
||||
|
||||
if (SCARG(uap, pid) == 0)
|
||||
SCARG(uap, pid) = -q->p_pgid;
|
||||
if (SCARG(uap, options) &~ (WUNTRACED|WNOHANG|WALTSIG))
|
||||
return (EINVAL);
|
||||
|
||||
loop:
|
||||
loop:
|
||||
nfound = 0;
|
||||
for (p = q->p_children.lh_first; p != 0; p = p->p_sibling.le_next) {
|
||||
if (SCARG(uap, pid) != WAIT_ANY &&
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_fork.c,v 1.83 2001/01/09 23:36:50 fvdl Exp $ */
|
||||
/* $NetBSD: kern_fork.c,v 1.84 2001/02/26 21:14:20 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
@ -106,11 +106,11 @@ fork1(struct proc *p1, int flags, int exitsig, void *stack, size_t stacksize,
|
||||
void (*func)(void *), void *arg, register_t *retval,
|
||||
struct proc **rnewprocp)
|
||||
{
|
||||
struct proc *p2, *tp;
|
||||
uid_t uid;
|
||||
int count, s;
|
||||
vaddr_t uaddr;
|
||||
static int nextpid, pidchecked = 0;
|
||||
struct proc *p2, *tp;
|
||||
uid_t uid;
|
||||
int count, s;
|
||||
vaddr_t uaddr;
|
||||
static int nextpid, pidchecked;
|
||||
|
||||
/*
|
||||
* Although process entries are dynamically created, we still keep
|
||||
@ -147,7 +147,7 @@ fork1(struct proc *p1, int flags, int exitsig, void *stack, size_t stacksize,
|
||||
*/
|
||||
|
||||
#ifndef USPACE_ALIGN
|
||||
#define USPACE_ALIGN 0
|
||||
#define USPACE_ALIGN 0
|
||||
#endif
|
||||
|
||||
uaddr = uvm_km_valloc_align(kernel_map, USPACE, USPACE_ALIGN);
|
||||
@ -301,7 +301,7 @@ fork1(struct proc *p1, int flags, int exitsig, void *stack, size_t stacksize,
|
||||
* ready to use (from nextpid+1 through pidchecked-1).
|
||||
*/
|
||||
nextpid++;
|
||||
retry:
|
||||
retry:
|
||||
/*
|
||||
* If the process ID prototype has wrapped around,
|
||||
* restart somewhat above 0, as the low-numbered procs
|
||||
@ -321,7 +321,7 @@ retry:
|
||||
* than nextpid, so we can avoid checking for a while.
|
||||
*/
|
||||
pd = proclists;
|
||||
again:
|
||||
again:
|
||||
LIST_FOREACH(tp, pd->pd_list, p_list) {
|
||||
while (tp->p_pid == nextpid ||
|
||||
tp->p_pgrp->pg_id == nextpid ||
|
||||
@ -438,7 +438,9 @@ again:
|
||||
void
|
||||
proc_trampoline_mp(void)
|
||||
{
|
||||
struct proc *p = curproc;
|
||||
struct proc *p;
|
||||
|
||||
p = curproc;
|
||||
|
||||
SCHED_ASSERT_UNLOCKED();
|
||||
KERNEL_PROC_LOCK(p);
|
||||
|
Loading…
Reference in New Issue
Block a user