Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Restore exporting of lwp_getpcb() to userland and fix DD...
details: https://anonhg.NetBSD.org/src/rev/ad29805f228a
branches: trunk
changeset: 749290:ad29805f228a
user: rmind <rmind%NetBSD.org@localhost>
date: Wed Nov 25 13:53:19 2009 +0000
description:
Restore exporting of lwp_getpcb() to userland and fix DDB properly.
While the header might be abstracted better, it is a separate issue.
diffstat:
sys/arch/i386/i386/db_trace.c | 10 +++-------
sys/sys/lwp.h | 16 ++++++++--------
2 files changed, 11 insertions(+), 15 deletions(-)
diffs (75 lines):
diff -r 96929af3df16 -r ad29805f228a sys/arch/i386/i386/db_trace.c
--- a/sys/arch/i386/i386/db_trace.c Wed Nov 25 13:38:38 2009 +0000
+++ b/sys/arch/i386/i386/db_trace.c Wed Nov 25 13:53:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.65 2009/11/21 19:59:51 dsl Exp $ */
+/* $NetBSD: db_trace.c,v 1.66 2009/11/25 13:53:19 rmind Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.65 2009/11/21 19:59:51 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.66 2009/11/25 13:53:19 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -452,6 +452,7 @@
sizeof(l), (char *)&l);
}
(*pr)("lid %d ", l.l_lid);
+ pcb = lwp_getpcb(&l);
#ifdef _KERNEL
if (l.l_proc == curproc &&
(lwp_t *)lwpaddr == curlwp) {
@@ -461,11 +462,6 @@
} else
#endif
{
-#ifdef _KERNEL
- pcb = lwp_getpcb(&l);
-#else
- pcb = &l.l_addr->u_pcb;
-#endif
db_read_bytes((db_addr_t)&pcb->pcb_ebp,
sizeof(frame), (char *)&frame);
db_read_bytes((db_addr_t)(frame + 1),
diff -r 96929af3df16 -r ad29805f228a sys/sys/lwp.h
--- a/sys/sys/lwp.h Wed Nov 25 13:38:38 2009 +0000
+++ b/sys/sys/lwp.h Wed Nov 25 13:53:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.125 2009/11/21 19:54:49 dsl Exp $ */
+/* $NetBSD: lwp.h,v 1.126 2009/11/25 13:53:19 rmind Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -197,6 +197,13 @@
#define UAREA_TO_USER(uarea) ((struct user *)((uarea) + UAREA_USER_OFFSET))
#endif /* !defined(UAREA_TO_USER) */
+static inline void *
+lwp_getpcb(struct lwp *l)
+{
+
+ return &l->l_addr->u_pcb;
+}
+
LIST_HEAD(lwplist, lwp); /* a list of LWPs */
#ifdef _KERNEL
@@ -391,13 +398,6 @@
return MAX(l->l_inheritedprio, pri);
}
-static inline struct pcb *
-lwp_getpcb(lwp_t *l)
-{
-
- return &l->l_addr->u_pcb;
-}
-
int lwp_create(lwp_t *, struct proc *, vaddr_t, int,
void *, size_t, void (*)(void *), void *, lwp_t **, int);
Home |
Main Index |
Thread Index |
Old Index