Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add lwp_getpcb(). OK matt@.
details: https://anonhg.NetBSD.org/src/rev/fcbe9cccb450
branches: trunk
changeset: 749167:fcbe9cccb450
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Nov 20 03:12:13 2009 +0000
description:
Add lwp_getpcb(). OK matt@.
diffstat:
sys/sys/lwp.h | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 255ea610eaff -r fcbe9cccb450 sys/sys/lwp.h
--- a/sys/sys/lwp.h Fri Nov 20 02:17:07 2009 +0000
+++ b/sys/sys/lwp.h Fri Nov 20 03:12:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.122 2009/11/01 20:57:34 rmind Exp $ */
+/* $NetBSD: lwp.h,v 1.123 2009/11/20 03:12:13 rmind Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
struct cpu_info *volatile l_cpu;/* s: CPU we're on if LSONPROC */
kmutex_t * volatile l_mutex; /* l: ptr to mutex on sched state */
int l_ctxswtch; /* l: performing a context switch */
- struct user *l_addr; /* l: KVA of u-area (PROC ONLY) */
+ struct user *l_addr; /* l: PCB address; use lwp_getpcb() */
struct mdlwp l_md; /* l: machine-dependent fields. */
int l_flag; /* l: misc flag values */
int l_stat; /* l: overall LWP status */
@@ -391,6 +391,13 @@
return MAX(l->l_inheritedprio, pri);
}
+static inline void *
+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