Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern stop ktrace at process exit
details: https://anonhg.NetBSD.org/src/rev/cb0b18ff74e0
branches: trunk
changeset: 325155:cb0b18ff74e0
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Dec 09 16:21:15 2013 +0000
description:
stop ktrace at process exit
diffstat:
sys/rump/librump/rumpkern/lwproc.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 7ebc0771e55e -r cb0b18ff74e0 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Mon Dec 09 09:35:16 2013 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Mon Dec 09 16:21:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.24 2013/10/27 20:25:45 pooka Exp $ */
+/* $NetBSD: lwproc.c,v 1.25 2013/12/09 16:21:15 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.24 2013/10/27 20:25:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.25 2013/12/09 16:21:15 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -34,6 +34,7 @@
#include <sys/kauth.h>
#include <sys/kmem.h>
#include <sys/lwp.h>
+#include <sys/ktrace.h>
#include <sys/pool.h>
#include <sys/proc.h>
#include <sys/queue.h>
@@ -51,12 +52,20 @@
{
kauth_cred_t cred;
+ KASSERT(p->p_stat == SDYING || p->p_stat == SDEAD);
+
+#ifdef KTRACE
+ if (p->p_tracep) {
+ mutex_enter(&ktrace_lock);
+ ktrderef(p);
+ mutex_exit(&ktrace_lock);
+ }
+#endif
+
mutex_enter(proc_lock);
KASSERT(p->p_nlwps == 0);
KASSERT(LIST_EMPTY(&p->p_lwps));
- KASSERT(p->p_stat == SACTIVE || p->p_stat == SDYING ||
- p->p_stat == SDEAD);
LIST_REMOVE(p, p_list);
LIST_REMOVE(p, p_sibling);
Home |
Main Index |
Thread Index |
Old Index