Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Remove __MUTEX_PRIVATE conditional in definition of...



details:   https://anonhg.NetBSD.org/src/rev/ba5e2e7ba6c3
branches:  trunk
changeset: 849558:ba5e2e7ba6c3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Mar 05 15:56:55 2020 +0000

description:
Remove __MUTEX_PRIVATE conditional in definition of struct kmutex.

This doesn't buy us anything but the need to hack around it in
ctfmerge to avoid massive duplication of kernel types -- which only
worked for the x86 definition.

This changes only x86 and arm for now, pending compile-testing the
remaining architectures.

diffstat:

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

diffs (57 lines):

diff -r f60ab8084c89 -r ba5e2e7ba6c3 sys/arch/arm/include/mutex.h
--- a/sys/arch/arm/include/mutex.h      Thu Mar 05 15:56:20 2020 +0000
+++ b/sys/arch/arm/include/mutex.h      Thu Mar 05 15:56:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.21 2019/11/29 22:55:33 riastradh Exp $     */
+/*     $NetBSD: mutex.h,v 1.22 2020/03/05 15:56:55 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -46,14 +46,6 @@
  * 
  */
 
-#ifndef __MUTEX_PRIVATE
-
-struct kmutex {
-       uintptr_t       mtx_pad1;
-};
-
-#else  /* __MUTEX_PRIVATE */
-
 struct kmutex {
        union {
                /* Adaptive mutex */
@@ -74,6 +66,8 @@
        } u;
 };
 
+#ifdef __MUTEX_PRIVATE
+
 #define        mtx_owner               u.mtxa_owner
 #define        mtx_ipl                 u.s.mtxs_ipl
 #define        mtx_lock                u.s.mtxs_lock
diff -r f60ab8084c89 -r ba5e2e7ba6c3 sys/arch/x86/include/mutex.h
--- a/sys/arch/x86/include/mutex.h      Thu Mar 05 15:56:20 2020 +0000
+++ b/sys/arch/x86/include/mutex.h      Thu Mar 05 15:56:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.7 2019/11/29 22:55:34 riastradh Exp $      */
+/*     $NetBSD: mutex.h,v 1.8 2020/03/05 15:56:55 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2002, 2006, 2009 The NetBSD Foundation, Inc.
@@ -35,14 +35,12 @@
 struct kmutex {
        union {
                volatile uintptr_t      mtxa_owner;
-#ifdef __MUTEX_PRIVATE
                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