Source-Changes-HG archive

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

[src/trunk]: src/sys/kern In exit1(), moved the call to the emulation exit ho...



details:   https://anonhg.NetBSD.org/src/rev/6cc212830754
branches:  trunk
changeset: 535267:6cc212830754
user:      manu <manu%NetBSD.org@localhost>
date:      Tue Aug 13 05:42:27 2002 +0000

description:
In exit1(), moved the call to the emulation exit hook to a place where it is
safet to sleep.

diffstat:

 sys/kern/kern_exit.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (44 lines):

diff -r 2423d38b6db9 -r 6cc212830754 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Tue Aug 13 05:33:51 2002 +0000
+++ b/sys/kern/kern_exit.c      Tue Aug 13 05:42:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exit.c,v 1.98 2002/08/07 11:13:41 briggs Exp $    */
+/*     $NetBSD: kern_exit.c,v 1.99 2002/08/13 05:42:27 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.98 2002/08/07 11:13:41 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.99 2002/08/13 05:42:27 manu Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -225,6 +225,12 @@
        systrace_sys_exit(p);
 #endif
        /*
+        * If emulation has process exit hook, call it now.
+        */
+       if (p->p_emul->e_proc_exit)
+               (*p->p_emul->e_proc_exit)(p);
+
+       /*
         * NOTE: WE ARE NO LONGER ALLOWED TO SLEEP!
         */
        p->p_stat = SDEAD;
@@ -325,12 +331,6 @@
        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.



Home | Main Index | Thread Index | Old Index