1
1

ATOMIC: fixed build issues (incorrect function proto)

Signed-off-by: Sergey Oblomov <sergeyo@mellanox.com>
Этот коммит содержится в:
Sergey Oblomov 2018-07-17 10:32:15 +03:00
родитель 2ac08ddfb6
Коммит 36cc69d47a
2 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -705,11 +705,11 @@ OSHMEM_DECLSPEC unsigned int pshmem_ctx_uint_atomic_fetch_and(shmem_ctx_t ctx, u
OSHMEM_DECLSPEC unsigned long pshmem_ctx_ulong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long *target, unsigned long value, int pe);
OSHMEM_DECLSPEC unsigned long long pshmem_ctx_ulonglong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long long *target, unsigned long long value, int pe);
#if OSHMEMP_HAVE_C11
#define pshmem_atomic_fetch_and(ctx, dst, val, pe) \
_Generic(&*(dst), \
int*: pshmem_ctx_uint_atomic_fetch_and, \
long*: pshmem_ctx_ulong_atomic_fetch_and, \
long long*: pshmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
#define pshmem_atomic_fetch_and(ctx, dst, val, pe) \
_Generic(&*(dst), \
unsigned int*: pshmem_ctx_uint_atomic_fetch_and, \
unsigned long*: pshmem_ctx_ulong_atomic_fetch_and, \
unsigned long long*: pshmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
#endif
OSHMEM_DECLSPEC unsigned int pshmem_uint_atomic_fetch_and(unsigned int *target, unsigned int value, int pe);
@ -752,7 +752,7 @@ OSHMEM_DECLSPEC unsigned long pshmem_ctx_ulong_atomic_fetch_xor(shmem_ctx_t ctx,
OSHMEM_DECLSPEC unsigned long long pshmem_ctx_ulonglong_atomic_fetch_xor(shmem_ctx_t ctx, unsigned long long *target, unsigned long long value, int pe);
#if OSHMEM_HAVE_C11
#define pshmem_atomic_fetch_xor(ctx, dst, val, pe) \
_Generic(&*(dst), \
_Generic(&*(dst), \
unsigned int*: pshmem_ctx_uint_atomic_fetch_xor, \
unsigned long*: pshmem_ctx_ulong_atomic_fetch_xor, \
unsigned long long*: pshmem_ctx_ulonglong_atomic_fetch_xor)(ctx, dst, val, pe)

Просмотреть файл

@ -794,13 +794,13 @@ OSHMEM_DECLSPEC long long shmem_longlong_fadd(long long *target, long long value
/* Atomic Fetch&And */
OSHMEM_DECLSPEC unsigned int shmem_ctx_uint_atomic_fetch_and(shmem_ctx_t ctx, unsigned int *target, unsigned int value, int pe);
OSHMEM_DECLSPEC unsigned long shmem_ctx_ulong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long *target, unsigned long value, int pe);
OSHMEM_DECLSPEC unsigned long long shmem_ctx_ulonglong_atomic_fetch_and(shmem_ctx_t ctx, long long *target, unsigned long long value, int pe);
OSHMEM_DECLSPEC unsigned long long shmem_ctx_ulonglong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long long *target, unsigned long long value, int pe);
#if OSHMEM_HAVE_C11
#define shmem_atomic_fetch_and(ctx, dst, val, pe) \
_Generic(&*(dst), \
int*: shmem_ctx_uint_atomic_fetch_and, \
long*: shmem_ctx_ulong_atomic_fetch_and, \
long long*: shmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
#define shmem_atomic_fetch_and(ctx, dst, val, pe) \
_Generic(&*(dst), \
unsigned int*: shmem_ctx_uint_atomic_fetch_and, \
unsigned long*: shmem_ctx_ulong_atomic_fetch_and, \
unsigned long long*: shmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
#endif
OSHMEM_DECLSPEC unsigned int shmem_uint_atomic_fetch_and(unsigned int *target, unsigned int value, int pe);