Module Name: src
Committed By: riastradh
Date: Thu Mar 5 17:58:08 UTC 2020
Modified Files:
src/sys/arch/arm/include: mutex.h
src/sys/arch/x86/include: mutex.h
Log Message:
Fix userland build by surrounding stuff with #ifdef _KERNEL.
(...Why does this header file get exposed to userland at all?)
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/mutex.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/mutex.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/include/mutex.h
diff -u src/sys/arch/arm/include/mutex.h:1.22 src/sys/arch/arm/include/mutex.h:1.23
--- src/sys/arch/arm/include/mutex.h:1.22 Thu Mar 5 15:56:55 2020
+++ src/sys/arch/arm/include/mutex.h Thu Mar 5 17:58:08 2020
@@ -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 @@ struct kmutex {
/* Adaptive mutex */
volatile uintptr_t mtxa_owner; /* 0-3 */
+#ifdef _KERNEL
/* Spin mutex */
struct {
/*
@@ -63,6 +64,7 @@ struct kmutex {
__cpu_simple_lock_t mtxs_lock;
volatile uint8_t mtxs_unused;
} s;
+#endif
} u;
};
Index: src/sys/arch/x86/include/mutex.h
diff -u src/sys/arch/x86/include/mutex.h:1.8 src/sys/arch/x86/include/mutex.h:1.9
--- src/sys/arch/x86/include/mutex.h:1.8 Thu Mar 5 15:56:55 2020
+++ src/sys/arch/x86/include/mutex.h Thu Mar 5 17:58:08 2020
@@ -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;
};