Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern minor KNF
details: https://anonhg.NetBSD.org/src/rev/4aee8e15a002
branches: trunk
changeset: 504295:4aee8e15a002
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Feb 26 21:09:57 2001 +0000
description:
minor KNF
diffstat:
sys/kern/kern_exit.c | 23 +++++++++++------------
sys/kern/kern_fork.c | 22 ++++++++++++----------
2 files changed, 23 insertions(+), 22 deletions(-)
diffs (122 lines):
diff -r 2dd27c00d29c -r 4aee8e15a002 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Mon Feb 26 21:07:51 2001 +0000
+++ b/sys/kern/kern_exit.c Mon Feb 26 21:09:57 2001 +0000
@@ -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 @@
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 @@
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 @@
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 &&
diff -r 2dd27c00d29c -r 4aee8e15a002 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c Mon Feb 26 21:07:51 2001 +0000
+++ b/sys/kern/kern_fork.c Mon Feb 26 21:09:57 2001 +0000
@@ -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 @@
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 @@
*/
#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 @@
* 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 @@
* 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 @@
void
proc_trampoline_mp(void)
{
- struct proc *p = curproc;
+ struct proc *p;
+
+ p = curproc;
SCHED_ASSERT_UNLOCKED();
KERNEL_PROC_LOCK(p);
Home |
Main Index |
Thread Index |
Old Index