8 static inline int a_ll(volatile int *p)
11 __asm__ __volatile__ (
13 : "=r"(v) : LLSC_M(*p));
18 static inline int a_sc(volatile int *p, int v)
21 __asm__ __volatile__ (
23 : "=r"(r), "="LLSC_M(*p) : "0"(v) : "memory");
28 static inline void *a_ll_p(volatile void *p)
31 __asm__ __volatile__ (
33 : "=r"(v) : LLSC_M(*(void *volatile *)p));
38 static inline int a_sc_p(volatile void *p, void *v)
41 __asm__ __volatile__ (
43 : "=r"(r), "="LLSC_M(*(void *volatile *)p) : "0"(v) : "memory");
47 #define a_barrier a_barrier
48 static inline void a_barrier()
50 __asm__ __volatile__ ("sync" : : : "memory");
53 #define a_pre_llsc a_barrier
54 #define a_post_llsc a_barrier