@@ -101,7 +101,9 @@ static inline void a_store(volatile int *p, int x)
while (__k_cas(*p, x, p));
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
__k_cas(0, 0, &(int){0});
@@ -96,6 +96,11 @@ static inline void a_spin()
__asm__ __volatile__( "pause" : : : "memory" );
+{
+ __asm__ __volatile__( "" : : : "memory" );
+}
static inline void a_crash()
__asm__ __volatile__( "hlt" : : : "memory" );
@@ -95,7 +95,9 @@ static inline void a_store(volatile int *p, int x)
: "=m"(*p) : "r"(x) : "memory" );
a_cas(&(int){0}, 0, 0);
@@ -135,7 +135,9 @@ static inline void a_store(volatile int *p, int x)
: "+m"(*p) : "r"(x) : "memory" );
@@ -72,7 +72,9 @@ static inline void a_store(volatile int *p, int x)
a_swap(p, x);
@@ -78,7 +78,9 @@ static inline void a_store(volatile int *p, int x)
@@ -51,7 +51,9 @@ static inline void a_dec(volatile int *x)
a_fetch_add(x, -1);
@@ -91,6 +91,11 @@ static inline void a_spin()