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/linux Just define ACCESS_ONC...



details:   https://anonhg.NetBSD.org/src/rev/36d4d646065e
branches:  trunk
changeset: 835157:36d4d646065e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:45:43 2018 +0000

description:
Just define ACCESS_ONCE rather than patch it out.

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r c6ffefec04ef -r 36d4d646065e sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Mon Aug 27 07:45:33 2018 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Mon Aug 27 07:45:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.18 2018/08/27 07:42:55 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.19 2018/08/27 07:45:43 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -128,6 +128,12 @@
        }                                                               \
 } while (0)
 
+#define        ACCESS_ONCE(X) ({                                                     \
+       typeof(X) __access_once_tmp = (X);                                    \
+       __insn_barrier();                                                     \
+       __access_once_tmp;                                                    \
+})
+
 static inline int64_t
 abs64(int64_t x)
 {



Home | Main Index | Thread Index | Old Index