atomic: Cleanup atomic_cmpxchg header
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 21 Jun 2018 19:27:12 +0000 (19:27 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Thu, 21 Jun 2018 19:27:12 +0000 (19:27 +0000)
It's easier to just list the four function declarations

Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335275

libclc/generic/include/clc/atomic/atomic_cmpxchg.h

index 2e4f1c2..15bfdab 100644 (file)
@@ -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);