Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/vchiq/dist/interface/compat Sync memory bar...



details:   https://anonhg.NetBSD.org/src/rev/0cae018bcc95
branches:  trunk
changeset: 350463:0cae018bcc95
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jan 12 05:25:03 2017 +0000

description:
Sync memory barriers with sys/external/bsd/drm2/include/asm/barrier.h

diffstat:

 sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h |  17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 6b6e91c31abe -r 0cae018bcc95 sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h
--- a/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h   Thu Jan 12 05:24:36 2017 +0000
+++ b/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h   Thu Jan 12 05:25:03 2017 +0000
@@ -327,13 +327,20 @@
 #define BCM2835_MBOX_CHAN_VCHIQ        3
 #define bcm_mbox_write bcmmbox_write
 
-#define rmb    membar_consumer
-#define wmb    membar_producer
+#define mb      membar_sync
+#define wmb     membar_producer
+#define rmb     membar_consumer
 #define dsb    membar_producer
 
-#define smp_mb membar_producer
-#define smp_rmb        membar_consumer
-#define smp_wmb        membar_producer
+#ifdef MULTIPROCESSOR
+#  define       smp_mb                          mb
+#  define       smp_wmb                         wmb
+#  define       smp_rmb                         rmb
+#else
+#  define       smp_mb()                        do {} while (0)
+#  define       smp_wmb()                       do {} while (0)
+#  define       smp_rmb()                       do {} while (0)
+#endif
 
 #define device_print_prettyname(dev)   device_printf((dev), "")
 



Home | Main Index | Thread Index | Old Index