Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux linux/ww_mutex: Make wwm...
details: https://anonhg.NetBSD.org/src/rev/de2b5eccecd7
branches: trunk
changeset: 368545:de2b5eccecd7
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Jul 17 17:04:02 2022 +0000
description:
linux/ww_mutex: Make wwm_debug member unconditional.
This way LOCKDEBUG doesn't change any structure sizes. Shuffle
members around to make better use of padding, on both LP32 and LP64.
diffstat:
sys/external/bsd/drm2/include/linux/ww_mutex.h | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (42 lines):
diff -r 10f88d391034 -r de2b5eccecd7 sys/external/bsd/drm2/include/linux/ww_mutex.h
--- a/sys/external/bsd/drm2/include/linux/ww_mutex.h Sun Jul 17 15:37:10 2022 +0000
+++ b/sys/external/bsd/drm2/include/linux/ww_mutex.h Sun Jul 17 17:04:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ww_mutex.h,v 1.14 2021/12/19 10:38:14 riastradh Exp $ */
+/* $NetBSD: ww_mutex.h,v 1.15 2022/07/17 17:04:02 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -58,13 +58,16 @@
struct rb_node wwx_rb_node;
};
+enum ww_mutex_state {
+ WW_UNLOCKED, /* nobody owns it */
+ WW_OWNED, /* owned by a lwp without a context */
+ WW_CTX, /* owned by a context */
+ WW_WANTOWN, /* owned by ctx, waiters w/o ctx waiting */
+};
+
struct ww_mutex {
- enum ww_mutex_state {
- WW_UNLOCKED, /* nobody owns it */
- WW_OWNED, /* owned by a lwp without a context */
- WW_CTX, /* owned by a context */
- WW_WANTOWN, /* owned by ctx, waiters w/o ctx waiting */
- } wwm_state;
+ uint8_t wwm_state;
+ bool wwm_debug;
union {
struct lwp *owner;
struct ww_acquire_ctx *ctx;
@@ -77,9 +80,6 @@
struct ww_class *wwm_class;
struct rb_tree wwm_waiters;
kcondvar_t wwm_cv;
-#ifdef LOCKDEBUG
- bool wwm_debug;
-#endif
};
/* XXX Make the nm output a little more greppable... */
Home |
Main Index |
Thread Index |
Old Index