Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Move the call up exit hooks before curproc = NULL s...
details: https://anonhg.NetBSD.org/src/rev/d8e58b07255c
branches: trunk
changeset: 534778:d8e58b07255c
user: manu <manu%NetBSD.org@localhost>
date: Fri Aug 02 22:45:57 2002 +0000
description:
Move the call up exit hooks before curproc = NULL so that we can
use lockmgr in exit hooks.
diffstat:
sys/kern/kern_exit.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r 1c328a53a8f7 -r d8e58b07255c sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Fri Aug 02 22:20:59 2002 +0000
+++ b/sys/kern/kern_exit.c Fri Aug 02 22:45:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exit.c,v 1.95 2002/07/25 20:04:02 jdolecek Exp $ */
+/* $NetBSD: kern_exit.c,v 1.96 2002/08/02 22:45:57 manu Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.95 2002/07/25 20:04:02 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.96 2002/08/02 22:45:57 manu Exp $");
#include "opt_ktrace.h"
#include "opt_systrace.h"
@@ -310,6 +310,12 @@
sigactsfree(p);
/*
+ * If emulation has process exit hook, call it now.
+ */
+ if (p->p_emul->e_proc_exit)
+ (*p->p_emul->e_proc_exit)(p);
+
+ /*
* Clear curproc after we've done all operations
* that could block, and before tearing down the rest
* of the process state that might be used from clock, etc.
@@ -323,12 +329,6 @@
limfree(p->p_limit);
p->p_limit = NULL;
- /*
- * If emulation has process exit hook, call it now.
- */
- if (p->p_emul->e_proc_exit)
- (*p->p_emul->e_proc_exit)(p);
-
/* This process no longer needs to hold the kernel lock. */
KERNEL_PROC_UNLOCK(p);
Home |
Main Index |
Thread Index |
Old Index