summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/clib.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-22 10:18:13 +0100
committerOle Trøan <otroan@employees.org>2017-03-22 19:52:47 +0000
commiteaabe073515e7722ed546b36f99efc6feea305a1 (patch)
tree7c5cfe203815d8cc8d989de646e5dedcd6bc2f9d /src/vppinfra/clib.h
parent24d01367c869f968b9e21c0cae4df8c5941fdf16 (diff)
Add memif - packet memory interface for intra-host communication
Change-Id: I94c06b07a39f07ceba87bf3e7fcfc70e43231e8a Signed-off-by: Damjan Marion <damarion@cisco.com> Co-Authored-By: Milan Lenco <Milan.Lenco@pantheon.tech>
Diffstat (limited to 'src/vppinfra/clib.h')
-rw-r--r--src/vppinfra/clib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h
index 0386c756833..fbb2a21c6b9 100644
--- a/src/vppinfra/clib.h
+++ b/src/vppinfra/clib.h
@@ -100,6 +100,12 @@
/* Full memory barrier (read and write). */
#define CLIB_MEMORY_BARRIER() __sync_synchronize ()
+#if __x86_64__
+#define CLIB_MEMORY_STORE_BARRIER() __builtin_ia32_sfence ()
+#else
+#define CLIB_MEMORY_STORE_BARRIER() __sync_synchronize ()
+#endif
+
/* Arranges for function to be called before main. */
#define INIT_FUNCTION(decl) \
decl __attribute ((constructor)); \