Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/include/asm Use adequate memory barr...



details:   https://anonhg.NetBSD.org/src/rev/d3a6bbaf13ba
branches:  trunk
changeset: 1028435:d3a6bbaf13ba
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:02:54 2021 +0000

description:
Use adequate memory barrier for load-acquire semantics.

It is unfortunate that we chose the name membar_enter to have the
wrong semantics for this.

diffstat:

 sys/external/bsd/common/include/asm/barrier.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 06c750595268 -r d3a6bbaf13ba sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h     Sun Dec 19 11:02:46 2021 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h     Sun Dec 19 11:02:54 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: barrier.h,v 1.7 2021/12/19 11:02:46 riastradh Exp $    */
+/*     $NetBSD: barrier.h,v 1.8 2021/12/19 11:02:54 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 
 #if defined(MULTIPROCESSOR) && !defined(__HAVE_ATOMIC_AS_MEMBAR)
 #  define      smp_mb__before_atomic()         membar_exit()
-#  define      smp_mb__after_atomic()          membar_enter()
+#  define      smp_mb__after_atomic()          membar_sync() /* XXX acquire */
 #else
 #  define      smp_mb__before_atomic()         __insn_barrier()
 #  define      smp_mb__after_atomic()          __insn_barrier()



Home | Main Index | Thread Index | Old Index