Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Rearrange some code slightly.



details:   https://anonhg.NetBSD.org/src/rev/7d5706a18a41
branches:  trunk
changeset: 474842:7d5706a18a41
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jul 22 18:28:30 1999 +0000

description:
Rearrange some code slightly.

diffstat:

 sys/kern/kern_fork.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 66380887271c -r 7d5706a18a41 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c      Thu Jul 22 18:16:05 1999 +0000
+++ b/sys/kern/kern_fork.c      Thu Jul 22 18:28:30 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_fork.c,v 1.59 1999/05/13 21:58:37 thorpej Exp $   */
+/*     $NetBSD: kern_fork.c,v 1.60 1999/07/22 18:28:30 thorpej Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -244,16 +244,18 @@
         * Put the proc on allproc before unlocking PID allocation
         * so that waiters won't grab it as soon as we unlock.
         */
+
+       p2->p_stat = SIDL;                      /* protect against others */
+       p2->p_forw = p2->p_back = NULL;         /* shouldn't be necessary */
+
        LIST_INSERT_HEAD(&allproc, p2, p_list);
 
+       LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash);
+
        /*
         * END PID ALLOCATION.  (Unlock PID allocation variables).
         */
 
-       p2->p_stat = SIDL;                      /* protect against others */
-       p2->p_forw = p2->p_back = NULL;         /* shouldn't be necessary */
-       LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash);
-
        /*
         * Make a proc table entry for the new process.
         * Start by zeroing the section of proc that is zero-initialized,



Home | Main Index | Thread Index | Old Index