diff options
author | John Baldwin <jhb@FreeBSD.org> | 2007-05-14 22:21:58 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2007-05-14 22:21:58 +0000 |
commit | 1bba2a940b349d2692fab3ac8fb0a893b889aefd (patch) | |
tree | b157dbdf4d94b30f7dfc04ac706e1552547a31e8 /sys/kern/kern_exit.c | |
parent | e62c19b256459f5431346b34e8696f886cb27d8a (diff) | |
download | src-1bba2a940b349d2692fab3ac8fb0a893b889aefd.tar.gz src-1bba2a940b349d2692fab3ac8fb0a893b889aefd.zip |
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 1d60fe729152..029fe3a12f4b 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -406,6 +406,16 @@ retry: sx_xunlock(&allproc_lock); /* + * Call machine-dependent code to release any + * machine-dependent resources other than the address space. + * The address space is released by "vmspace_exitfree(p)" in + * vm_waitproc(). + */ + cpu_exit(td); + + WITNESS_WARN(WARN_PANIC, NULL, "process (pid %d) exiting", p->p_pid); + + /* * Reparent all of our children to init. */ sx_xlock(&proctree_lock); @@ -484,22 +494,6 @@ retry: else /* LINUX thread */ psignal(p->p_pptr, p->p_sigparent); } - PROC_UNLOCK(p->p_pptr); - PROC_UNLOCK(p); - - /* - * Finally, call machine-dependent code to release the remaining - * resources including address space. - * The address space is released by "vmspace_exitfree(p)" in - * vm_waitproc(). - */ - cpu_exit(td); - - WITNESS_WARN(WARN_PANIC, &proctree_lock.lock_object, - "process (pid %d) exiting", p->p_pid); - - PROC_LOCK(p); - PROC_LOCK(p->p_pptr); sx_xunlock(&proctree_lock); /* |