Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Comment on previous explaining why it's needed.



details:   https://anonhg.NetBSD.org/src/rev/91b7d1a058d1
branches:  trunk
changeset: 967499:91b7d1a058d1
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Dec 11 20:46:06 2019 +0000

description:
Comment on previous explaining why it's needed.

diffstat:

 sys/kern/kern_mutex.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 27ac9e83e1b6 -r 91b7d1a058d1 sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c     Wed Dec 11 20:34:06 2019 +0000
+++ b/sys/kern/kern_mutex.c     Wed Dec 11 20:46:06 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_mutex.c,v 1.85 2019/12/11 20:34:06 ad Exp $       */
+/*     $NetBSD: kern_mutex.c,v 1.86 2019/12/11 20:46:06 ad Exp $       */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #define        __MUTEX_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.85 2019/12/11 20:34:06 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.86 2019/12/11 20:46:06 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -720,6 +720,11 @@
        }
 
 #ifndef __HAVE_MUTEX_STUBS
+       /*
+        * On some architectures without mutex stubs, we can enter here to
+        * release mutexes before interrupts and whatnot are up and running. 
+        * We need this hack to keep them sweet.
+        */
        if (__predict_false(cold)) {
                MUTEX_UNLOCKED(mtx);
                MUTEX_RELEASE(mtx);



Home | Main Index | Thread Index | Old Index