Deleted Added
full compact
kern_exit.c (92723) kern_exit.c (92751)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
39 * $FreeBSD: head/sys/kern/kern_exit.c 92723 2002-03-19 21:25:46Z alfred $
39 * $FreeBSD: head/sys/kern/kern_exit.c 92751 2002-03-20 04:09:59Z jeff $
40 */
41
42#include "opt_compat.h"
43#include "opt_ktrace.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/sysproto.h>

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

65#include <sys/sem.h>
66#include <sys/jail.h>
67
68#include <vm/vm.h>
69#include <vm/vm_param.h>
70#include <vm/vm_extern.h>
71#include <vm/pmap.h>
72#include <vm/vm_map.h>
40 */
41
42#include "opt_compat.h"
43#include "opt_ktrace.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/sysproto.h>

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

65#include <sys/sem.h>
66#include <sys/jail.h>
67
68#include <vm/vm.h>
69#include <vm/vm_param.h>
70#include <vm/vm_extern.h>
71#include <vm/pmap.h>
72#include <vm/vm_map.h>
73#include <vm/vm_zone.h>
73#include <vm/uma.h>
74#include <sys/user.h>
75
76/* Required to be non-static for SysVR4 emulator */
77MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status");
78
79static MALLOC_DEFINE(M_ATEXIT, "atexit", "atexit callback");
80
81static int wait1(struct thread *, struct wait_args *, int);

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

649
650 /*
651 * Give vm and machine-dependent layer a chance
652 * to free anything that cpu_exit couldn't
653 * release while still running in process context.
654 */
655 vm_waitproc(p);
656 mtx_destroy(&p->p_mtx);
74#include <sys/user.h>
75
76/* Required to be non-static for SysVR4 emulator */
77MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status");
78
79static MALLOC_DEFINE(M_ATEXIT, "atexit", "atexit callback");
80
81static int wait1(struct thread *, struct wait_args *, int);

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

649
650 /*
651 * Give vm and machine-dependent layer a chance
652 * to free anything that cpu_exit couldn't
653 * release while still running in process context.
654 */
655 vm_waitproc(p);
656 mtx_destroy(&p->p_mtx);
657 zfree(proc_zone, p);
657 uma_zfree(proc_zone, p);
658 nprocs--;
659 error = 0;
660 goto done2;
661 }
662 if (p->p_stat == SSTOP && (p->p_flag & P_WAITED) == 0 &&
663 (p->p_flag & P_TRACED || uap->options & WUNTRACED)) {
664 mtx_unlock_spin(&sched_lock);
665 p->p_flag |= P_WAITED;

--- 107 unchanged lines hidden ---
658 nprocs--;
659 error = 0;
660 goto done2;
661 }
662 if (p->p_stat == SSTOP && (p->p_flag & P_WAITED) == 0 &&
663 (p->p_flag & P_TRACED || uap->options & WUNTRACED)) {
664 mtx_unlock_spin(&sched_lock);
665 p->p_flag |= P_WAITED;

--- 107 unchanged lines hidden ---