c11_atomics: align signedness of host types (#1816)

Some `HOST_` types were declared with signedness different from the
`HOST_ATOMIC_` counterparts, leading to sign-compare warnings when
comparing between types.  Fix by aligning the signedness.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2023-11-14 17:09:45 +00:00
committed by GitHub
parent f08b3f6aee
commit ea6e536ed3

View File

@@ -53,12 +53,12 @@ enum TExplicitMemoryOrderType
#endif
#define HOST_ATOMIC_INTPTR_T32 HOST_ATOMIC_INT
#define HOST_ATOMIC_UINTPTR_T32 HOST_ATOMIC_INT
#define HOST_ATOMIC_UINTPTR_T32 HOST_ATOMIC_UINT
#define HOST_ATOMIC_SIZE_T32 HOST_ATOMIC_UINT
#define HOST_ATOMIC_PTRDIFF_T32 HOST_ATOMIC_INT
#define HOST_ATOMIC_INTPTR_T64 HOST_ATOMIC_LONG
#define HOST_ATOMIC_UINTPTR_T64 HOST_ATOMIC_LONG
#define HOST_ATOMIC_UINTPTR_T64 HOST_ATOMIC_ULONG
#define HOST_ATOMIC_SIZE_T64 HOST_ATOMIC_ULONG
#define HOST_ATOMIC_PTRDIFF_T64 HOST_ATOMIC_LONG
@@ -82,7 +82,7 @@ enum TExplicitMemoryOrderType
#define HOST_SIZE_T64 cl_ulong
#define HOST_PTRDIFF_T64 cl_long
#define HOST_FLAG cl_uint
#define HOST_FLAG cl_int
// host atomic functions
void host_atomic_thread_fence(TExplicitMemoryOrderType order);