use the generic ioctl.h for x86_64, x32 and aarch64
[musl] / arch / arm / atomic_arch.h
index a74cf3b..706fa1f 100644 (file)
@@ -16,7 +16,7 @@ static inline int a_ll(volatile int *p)
 static inline int a_sc(volatile int *p, int v)
 {
        int r;
-       __asm__ __volatile__ ("strex %0,%1,%2" : "=&r"(r) : "r"(v), "Q"(*p) : "memory");
+       __asm__ __volatile__ ("strex %0,%2,%1" : "=&r"(r), "=Q"(*p) : "r"(v) : "memory");
        return !r;
 }
 
@@ -66,9 +66,11 @@ static inline void a_barrier()
 #define a_crash a_crash
 static inline void a_crash()
 {
-       __asm__ __volatile__(".byte 0xf1, 0xde"
+       __asm__ __volatile__(
 #ifndef __thumb__
-               ", 0xfd, 0xe7"
+               ".word 0xe7f000f0"
+#else
+               ".short 0xdeff"
 #endif
                : : : "memory");
 }