Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit(). cpu_wait() must be done before uvm_exit() because the resources it frees might be located in the PCB.
This commit is contained in:
parent
963921febe
commit
32e1fd0d03
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_netbsd.c,v 1.15 1999/06/17 15:47:23 thorpej Exp $ */
|
||||
/* $NetBSD: netbsd32_netbsd.c,v 1.16 1999/07/20 21:54:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -748,12 +748,6 @@ loop:
|
|||
if (p->p_textvp)
|
||||
vrele(p->p_textvp);
|
||||
|
||||
/*
|
||||
* Give machine-dependent layer a chance
|
||||
* to free anything that cpu_exit couldn't
|
||||
* release while still running in process context.
|
||||
*/
|
||||
cpu_wait(p);
|
||||
pool_put(&proc_pool, p);
|
||||
nprocs--;
|
||||
return (0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_misc.c,v 1.77 1999/05/08 01:23:01 kleink Exp $ */
|
||||
/* $NetBSD: svr4_misc.c,v 1.78 1999/07/20 21:54:06 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -1218,12 +1218,6 @@ loop:
|
|||
if (q->p_textvp)
|
||||
vrele(q->p_textvp);
|
||||
|
||||
/*
|
||||
* Give machine-dependent layer a chance
|
||||
* to free anything that cpu_exit couldn't
|
||||
* release while still running in process context.
|
||||
*/
|
||||
cpu_wait(q);
|
||||
pool_put(&proc_pool, q);
|
||||
nprocs--;
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exit.c,v 1.70 1999/07/15 23:18:43 thorpej Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.71 1999/07/20 21:54:05 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -366,6 +366,14 @@ reaper()
|
|||
/* Remove us from the deadproc list. */
|
||||
LIST_REMOVE(p, p_list);
|
||||
|
||||
/*
|
||||
* Give machine-dependent code a chance to free any
|
||||
* resources it couldn't free while still running on
|
||||
* that process's context. This must be done before
|
||||
* uvm_exit(), in case these resources are in the PCB.
|
||||
*/
|
||||
cpu_wait(p);
|
||||
|
||||
/*
|
||||
* Free the VM resources we're still holding on to.
|
||||
* We must do this from a valid thread because doing
|
||||
|
@ -490,12 +498,6 @@ loop:
|
|||
if (p->p_textvp)
|
||||
vrele(p->p_textvp);
|
||||
|
||||
/*
|
||||
* Give machine-dependent layer a chance
|
||||
* to free anything that cpu_exit couldn't
|
||||
* release while still running in process context.
|
||||
*/
|
||||
cpu_wait(p);
|
||||
pool_put(&proc_pool, p);
|
||||
nprocs--;
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue