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 Guarantee no repeated lo...



details:   https://anonhg.NetBSD.org/src/rev/c9ca373036ba
branches:  trunk
changeset: 1028016:c9ca373036ba
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:39:27 2021 +0000

description:
Guarantee no repeated loads.

diffstat:

 sys/external/bsd/drm2/include/linux/atomic.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r a6fe649a94ac -r c9ca373036ba sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Sun Dec 19 01:39:20 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Sun Dec 19 01:39:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.25 2021/12/19 01:39:20 riastradh Exp $    */
+/*     $NetBSD: atomic.h,v 1.26 2021/12/19 01:39:27 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -207,6 +207,7 @@
        smp_mb__before_atomic();
        do {
                value = atomic->a_u.au_int;
+               __insn_barrier();
                if (value == zero)
                        break;
        } while (atomic_cas_uint(&atomic->a_u.au_uint, value, (value + addend))
@@ -389,6 +390,7 @@
        smp_mb__before_atomic();
        do {
                value = (long)a->al_v;
+               __insn_barrier();
                if (value == zero)
                        break;
        } while (atomic_cas_ulong(&a->al_v, (unsigned long)value,



Home | Main Index | Thread Index | Old Index