Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Move the call of cpu_wait() out of the wait4() functions...
details: https://anonhg.NetBSD.org/src/rev/68b35ad5c47b
branches: trunk
changeset: 474788:68b35ad5c47b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jul 20 21:54:05 1999 +0000
description:
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.
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 8 +-------
sys/compat/svr4/svr4_misc.c | 8 +-------
sys/kern/kern_exit.c | 16 +++++++++-------
3 files changed, 11 insertions(+), 21 deletions(-)
diffs (81 lines):
diff -r 5bacc48a28e7 -r 68b35ad5c47b sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 20 20:59:03 1999 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 20 21:54:05 1999 +0000
@@ -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 @@
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);
diff -r 5bacc48a28e7 -r 68b35ad5c47b sys/compat/svr4/svr4_misc.c
--- a/sys/compat/svr4/svr4_misc.c Tue Jul 20 20:59:03 1999 +0000
+++ b/sys/compat/svr4/svr4_misc.c Tue Jul 20 21:54:05 1999 +0000
@@ -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 @@
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;
diff -r 5bacc48a28e7 -r 68b35ad5c47b sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Tue Jul 20 20:59:03 1999 +0000
+++ b/sys/kern/kern_exit.c Tue Jul 20 21:54:05 1999 +0000
@@ -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.
@@ -367,6 +367,14 @@
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
* so may block.
@@ -490,12 +498,6 @@
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);
Home |
Main Index |
Thread Index |
Old Index