Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Move lwp_getpcb() into a (_KERNEL || _KMEMUSER) ifde...



details:   https://anonhg.NetBSD.org/src/rev/4c4712c460c9
branches:  trunk
changeset: 762304:4c4712c460c9
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Feb 19 00:22:50 2011 +0000

description:
Move lwp_getpcb() into a (_KERNEL || _KMEMUSER) ifdef.  Unbreaks crash(8).

diffstat:

 sys/sys/lwp.h |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 2f45ca33e4ce -r 4c4712c460c9 sys/sys/lwp.h
--- a/sys/sys/lwp.h     Sat Feb 19 00:13:55 2011 +0000
+++ b/sys/sys/lwp.h     Sat Feb 19 00:22:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lwp.h,v 1.146 2011/02/17 21:02:26 christos Exp $       */
+/*     $NetBSD: lwp.h,v 1.147 2011/02/19 00:22:50 jakllsch Exp $       */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -277,6 +277,15 @@
 #define        LSONPROC        7       /* Process is currently on a CPU. */
 #define        LSSUSPENDED     8       /* Not running, not signalable. */
 
+#if defined(_KERNEL) || defined(_KMEMUSER)
+static inline void *
+lwp_getpcb(struct lwp *l)
+{
+
+       return l->l_addr;
+}
+#endif /* _KERNEL || _KMEMUSER */
+
 #ifdef _KERNEL
 #define        LWP_CACHE_CREDS(l, p)                                           \
 do {                                                                   \
@@ -285,13 +294,6 @@
                lwp_update_creds(l);                                    \
 } while (/* CONSTCOND */ 0)
 
-static __inline void *
-lwp_getpcb(struct lwp *l)
-{
-
-       return l->l_addr;
-}
-
 void   lwpinit(void);
 void   lwp0_init(void);
 void   lwp_sys_init(void);



Home | Main Index | Thread Index | Old Index