Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Call MD code in mi_startlwp() before MI check for d...
details: https://anonhg.NetBSD.org/src/rev/e481611aa952
branches: trunk
changeset: 450979:e481611aa952
user: kamil <kamil%NetBSD.org@localhost>
date: Wed May 01 22:55:55 2019 +0000
description:
Call MD code in mi_startlwp() before MI check for debugger
This allows to get initialized mcontext.
diffstat:
sys/kern/sys_lwp.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 3046b001306c -r e481611aa952 sys/kern/sys_lwp.c
--- a/sys/kern/sys_lwp.c Wed May 01 21:59:32 2019 +0000
+++ b/sys/kern/sys_lwp.c Wed May 01 22:55:55 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_lwp.c,v 1.64 2019/05/01 21:57:34 kamil Exp $ */
+/* $NetBSD: sys_lwp.c,v 1.65 2019/05/01 22:55:55 kamil Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.64 2019/05/01 21:57:34 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.65 2019/05/01 22:55:55 kamil Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,6 +75,8 @@
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
+ (p->p_emul->e_startlwp)(arg);
+
/* If the process is traced, report lwp creation to a debugger */
if ((p->p_slflag & (PSL_TRACED|PSL_TRACELWP_CREATE|PSL_SYSCALL)) ==
(PSL_TRACED|PSL_TRACELWP_CREATE)) {
@@ -83,7 +85,7 @@
if ((p->p_slflag & (PSL_TRACED|PSL_TRACELWP_CREATE|PSL_SYSCALL)) !=
(PSL_TRACED|PSL_TRACELWP_CREATE)) {
mutex_exit(proc_lock);
- goto my_tracer_is_gone;
+ return;
}
mutex_enter(p->p_lock);
@@ -92,9 +94,6 @@
// XXX ktrpoint(KTR_PSIG)
mutex_exit(p->p_lock);
}
-
-my_tracer_is_gone:
- (p->p_emul->e_startlwp)(arg);
}
int
Home |
Main Index |
Thread Index |
Old Index