From: Mathieu Desnoyers Date: Tue, 22 Sep 2009 22:51:21 +0000 (-0400) Subject: update ppc atomic X-Git-Tag: v0.1~50 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5f8052b4e0acf2de0d3a143b82549d78413b29ab;p=urcu.git update ppc atomic Signed-off-by: Mathieu Desnoyers --- 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