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 Add Linux smp_mb__before...



details:   https://anonhg.NetBSD.org/src/rev/82c928642833
branches:  trunk
changeset: 365906:82c928642833
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:14:19 2018 +0000

description:
Add Linux smp_mb__before_atomic.

diffstat:

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

diffs (23 lines):

diff -r ef8e628c0378 -r 82c928642833 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 07:13:45 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 07:14:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.9 2018/08/27 07:08:58 riastradh Exp $     */
+/*     $NetBSD: atomic.h,v 1.10 2018/08/27 07:14:19 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -275,11 +275,13 @@
  * should be insn/inc/enter and exit/dec/insn, but the use of the
  * before/after memory barriers is not consistent throughout Linux.
  */
+#  define      smp_mb__before_atomic()         membar_sync()
 #  define      smp_mb__before_atomic_inc()     membar_sync()
 #  define      smp_mb__after_atomic_inc()      membar_sync()
 #  define      smp_mb__before_atomic_dec()     membar_sync()
 #  define      smp_mb__after_atomic_dec()      membar_sync()
 #else
+#  define      smp_mb__before_atomic()         __insn_barrier()
 #  define      smp_mb__before_atomic_inc()     __insn_barrier()
 #  define      smp_mb__after_atomic_inc()      __insn_barrier()
 #  define      smp_mb__before_atomic_dec()     __insn_barrier()



Home | Main Index | Thread Index | Old Index