X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=arch_atomic_ppc.h;h=16ddc012302dd397038c71da6b2f96cc817e21ff;hp=231a57798598e3da844d6938a95d9502b402da86;hb=5f8052b4e0acf2de0d3a143b82549d78413b29ab;hpb=0fad128bbcd6f99f2a4ebbc976a76ef1e3155d1c diff --git a/arch_atomic_ppc.h b/arch_atomic_ppc.h index 231a577..16ddc01 100644 --- a/arch_atomic_ppc.h +++ b/arch_atomic_ppc.h @@ -36,6 +36,13 @@ #ifndef _INCLUDE_API_H +#define atomic_set(addr, v) \ +do { \ + ACCESS_ONCE(*(addr)) = (v); \ +} while (0) + +#define atomic_read(addr) ACCESS_ONCE(*(addr)) + /* * Using a isync as second barrier for exchange to provide acquire semantic. * According to atomic_ops/sysdeps/gcc/powerpc.h, the documentation is "fairly