Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Fix userland build by surrounding stuff with #ifdef...



details:   https://anonhg.NetBSD.org/src/rev/8f299849f7d4
branches:  trunk
changeset: 1007963:8f299849f7d4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Mar 05 17:58:08 2020 +0000

description:
Fix userland build by surrounding stuff with #ifdef _KERNEL.

(...Why does this header file get exposed to userland at all?)

diffstat:

 sys/arch/arm/include/mutex.h |  4 +++-
 sys/arch/x86/include/mutex.h |  4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r f0df49b50a23 -r 8f299849f7d4 sys/arch/arm/include/mutex.h
--- a/sys/arch/arm/include/mutex.h      Thu Mar 05 16:05:45 2020 +0000
+++ b/sys/arch/arm/include/mutex.h      Thu Mar 05 17:58:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.22 2020/03/05 15:56:55 riastradh Exp $     */
+/*     $NetBSD: mutex.h,v 1.23 2020/03/05 17:58:08 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -51,6 +51,7 @@
                /* Adaptive mutex */
                volatile uintptr_t      mtxa_owner;     /* 0-3 */
 
+#ifdef _KERNEL
                /* Spin mutex */
                struct {
                        /*
@@ -63,6 +64,7 @@
                        __cpu_simple_lock_t     mtxs_lock;
                        volatile uint8_t        mtxs_unused;
                } s;
+#endif
        } u;
 };
 
diff -r f0df49b50a23 -r 8f299849f7d4 sys/arch/x86/include/mutex.h
--- a/sys/arch/x86/include/mutex.h      Thu Mar 05 16:05:45 2020 +0000
+++ b/sys/arch/x86/include/mutex.h      Thu Mar 05 17:58:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.8 2020/03/05 15:56:55 riastradh Exp $      */
+/*     $NetBSD: mutex.h,v 1.9 2020/03/05 17:58:08 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2002, 2006, 2009 The NetBSD Foundation, Inc.
@@ -35,12 +35,14 @@
 struct kmutex {
        union {
                volatile uintptr_t      mtxa_owner;
+#ifdef _KERNEL
                struct {
                        volatile uint8_t        mtxs_dummy;
                        ipl_cookie_t            mtxs_ipl;
                         __cpu_simple_lock_t    mtxs_lock;
                        volatile uint8_t        mtxs_unused;
                } s;
+#endif
        } u;
 };
 



Home | Main Index | Thread Index | Old Index