From 5f8052b4e0acf2de0d3a143b82549d78413b29ab Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 22 Sep 2009 18:51:21 -0400 Subject: [PATCH] update ppc atomic Signed-off-by: Mathieu Desnoyers --- arch_atomic_ppc.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.34.1