Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/kern Pullup rev 1.96 (requested by junyoung in tick...



details:   https://anonhg.NetBSD.org/src/rev/8104c5ffea00
branches:  netbsd-1-6
changeset: 530959:8104c5ffea00
user:      jmc <jmc%NetBSD.org@localhost>
date:      Wed Oct 22 06:15:50 2003 +0000

description:
Pullup rev 1.96 (requested by junyoung in ticket #1533)

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 ea526181c141 -r 8104c5ffea00 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Wed Oct 22 06:13:56 2003 +0000
+++ b/sys/kern/kern_exit.c      Wed Oct 22 06:15:50 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exit.c,v 1.93.6.1 2002/07/29 15:37:28 lukem Exp $ */
+/*     $NetBSD: kern_exit.c,v 1.93.6.2 2003/10/22 06:15:50 jmc 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.93.6.1 2002/07/29 15:37:28 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.93.6.2 2003/10/22 06:15:50 jmc Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_sysv.h"
@@ -304,6 +304,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.
@@ -317,12 +323,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