Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Provide KERNEL_LOCK facilities also for MODULAR, in ...



details:   https://anonhg.NetBSD.org/src/rev/41a7c067fed2
branches:  trunk
changeset: 1021766:41a7c067fed2
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jun 16 11:55:10 2021 +0000

description:
Provide KERNEL_LOCK facilities also for MODULAR, in addition to
MULTIPROCESSOR and _MODULE.

Otherwise, inconsistencies occur between UP kernel and modules,
that have been observed as:

http://mail-index.netbsd.org/port-powerpc/2020/07/07/msg003590.html
http://mail-index.netbsd.org/source-changes-d/2021/06/16/msg013369.html

diffstat:

 sys/sys/systm.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 0230edd418a3 -r 41a7c067fed2 sys/sys/systm.h
--- a/sys/sys/systm.h   Wed Jun 16 10:49:50 2021 +0000
+++ b/sys/sys/systm.h   Wed Jun 16 11:55:10 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: systm.h,v 1.300 2021/03/14 02:53:57 rin Exp $  */
+/*     $NetBSD: systm.h,v 1.301 2021/06/16 11:55:10 rin Exp $  */
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -46,6 +46,7 @@
 #include "opt_kasan.h"
 #include "opt_kcsan.h"
 #include "opt_kmsan.h"
+#include "opt_modular.h"
 #include "opt_wsdisplay_compat.h"
 #endif
 #if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -728,7 +729,7 @@
 bool   kernconfig_is_held(void);
 #endif
 
-#if defined(MULTIPROCESSOR) || defined(_MODULE)
+#if defined(MULTIPROCESSOR) || defined(MODULAR) || defined(_MODULE)
 #define        KERNEL_LOCK(count, lwp)                 \
 do {                                           \
        if ((count) != 0)                       \



Home | Main Index | Thread Index | Old Index