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});
}
__asm__ __volatile__( "pause" : : : "memory" );
}
+static inline void a_barrier()
+{
+ __asm__ __volatile__( "" : : : "memory" );
+}
+
static inline void a_crash()
{
__asm__ __volatile__( "hlt" : : : "memory" );
: "=m"(*p) : "r"(x) : "memory" );
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
a_cas(&(int){0}, 0, 0);
}
: "+m"(*p) : "r"(x) : "memory" );
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
a_cas(&(int){0}, 0, 0);
}
a_swap(p, x);
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
a_cas(&(int){0}, 0, 0);
}
: "=m"(*p) : "r"(x) : "memory" );
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
a_cas(&(int){0}, 0, 0);
}
a_fetch_add(x, -1);
}
-static inline void a_spin()
+#define a_spin a_barrier
+
+static inline void a_barrier()
{
a_cas(&(int){0}, 0, 0);
}
__asm__ __volatile__( "pause" : : : "memory" );
}
+static inline void a_barrier()
+{
+ __asm__ __volatile__( "" : : : "memory" );
+}
+
static inline void a_crash()
{
__asm__ __volatile__( "hlt" : : : "memory" );
__asm__ __volatile__( "pause" : : : "memory" );
}
+static inline void a_barrier()
+{
+ __asm__ __volatile__( "" : : : "memory" );
+}
+
static inline void a_crash()
{
__asm__ __volatile__( "hlt" : : : "memory" );