summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/smp.h
diff options
context:
space:
mode:
authorSirshak Das <sirshak.das@arm.com>2018-10-12 09:38:27 -0500
committerDamjan Marion <dmarion@me.com>2018-11-05 12:31:43 +0000
commit5b718d5cf8bd8df82e37825e0cdb6f986d9a784a (patch)
tree28399875bc4fe0ead3d3c78d649b4bbdd798d78a /src/vppinfra/smp.h
parent86327be9751ad54cb24d16c161cacb001dc20772 (diff)
Enable atomic swap and store macro with acquire and release ordering
Add atomic swap and store macro with acquire and release ordering respectively. Variable in question is interupt_pending variable which is used as guard variable by input nodes to process the device queue. Atomic Swap is used with Acquire ordering as writes or reads following this in program order should not be reordered before the swap. Atomic Store is used with Release ordering, as post store the node is added to pending list. Change-Id: I1be49e91a15c58d0bf21ff5ba1bd37d5d7d12f7a Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Diffstat (limited to 'src/vppinfra/smp.h')
-rw-r--r--src/vppinfra/smp.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/vppinfra/smp.h b/src/vppinfra/smp.h
index 7146e51ac77..2b3ed548dfa 100644
--- a/src/vppinfra/smp.h
+++ b/src/vppinfra/smp.h
@@ -41,8 +41,6 @@
#include <vppinfra/cache.h>
#include <vppinfra/os.h> /* for os_panic */
-#define clib_smp_swap(addr,new) __sync_lock_test_and_set(addr,new)
-
#if defined (i386) || defined (__x86_64__)
#define clib_smp_pause() do { asm volatile ("pause"); } while (0)
#elif defined (__aarch64__) || defined (__arm__)