[Libclc-dev] [PATCH 2/7] atomic: Cleanup atomic_cmpxchg header
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Wed Jun 20 13:34:59 PDT 2018
It's easier to just list the four function declarations
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
generic/include/clc/atomic/atomic_cmpxchg.h | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/generic/include/clc/atomic/atomic_cmpxchg.h b/generic/include/clc/atomic/atomic_cmpxchg.h
index 2e4f1c2..15bfdab 100644
--- a/generic/include/clc/atomic/atomic_cmpxchg.h
+++ b/generic/include/clc/atomic/atomic_cmpxchg.h
@@ -1,15 +1,4 @@
-#define __CLC_FUNCTION atomic_cmpxchg
-
-#define __CLC_DECLARE_ATOMIC_3_ARG(ADDRSPACE, TYPE) \
- _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION (volatile ADDRSPACE TYPE *, TYPE, TYPE);
-
-#define __CLC_DECLARE_ATOMIC_ADDRSPACE_3_ARG(TYPE) \
- __CLC_DECLARE_ATOMIC_3_ARG(global, TYPE) \
- __CLC_DECLARE_ATOMIC_3_ARG(local, TYPE)
-
-__CLC_DECLARE_ATOMIC_ADDRSPACE_3_ARG(int)
-__CLC_DECLARE_ATOMIC_ADDRSPACE_3_ARG(uint)
-
-#undef __CLC_FUNCTION
-#undef __CLC_DECLARE_ATOMIC_3_ARG
-#undef __CLC_DECLARE_ATOMIC_ADDRESS_SPACE_3_ARG
+_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg (volatile local int *, int, int);
+_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg (volatile global int *, int, int);
+_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg (volatile local uint *, uint, uint);
+_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg (volatile global uint *, uint, uint);
--
2.16.4
More information about the Libclc-dev
mailing list