Skip to content

Commit 9a8797a

Browse files
authored
Merge pull request #5440 from hoopoepg/topic/atomic-fix-build-issue
ATOMIC: fixed build issues (incorrect function proto)
2 parents 2ac08dd + 36cc69d commit 9a8797a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

oshmem/include/pshmem.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -705,11 +705,11 @@ OSHMEM_DECLSPEC unsigned int pshmem_ctx_uint_atomic_fetch_and(shmem_ctx_t ctx, u
705705
OSHMEM_DECLSPEC unsigned long pshmem_ctx_ulong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long *target, unsigned long value, int pe);
706706
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);
707707
#if OSHMEMP_HAVE_C11
708-
#define pshmem_atomic_fetch_and(ctx, dst, val, pe) \
709-
_Generic(&*(dst), \
710-
int*: pshmem_ctx_uint_atomic_fetch_and, \
711-
long*: pshmem_ctx_ulong_atomic_fetch_and, \
712-
long long*: pshmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
708+
#define pshmem_atomic_fetch_and(ctx, dst, val, pe) \
709+
_Generic(&*(dst), \
710+
unsigned int*: pshmem_ctx_uint_atomic_fetch_and, \
711+
unsigned long*: pshmem_ctx_ulong_atomic_fetch_and, \
712+
unsigned long long*: pshmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
713713
#endif
714714

715715
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,
752752
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);
753753
#if OSHMEM_HAVE_C11
754754
#define pshmem_atomic_fetch_xor(ctx, dst, val, pe) \
755-
_Generic(&*(dst), \
755+
_Generic(&*(dst), \
756756
unsigned int*: pshmem_ctx_uint_atomic_fetch_xor, \
757757
unsigned long*: pshmem_ctx_ulong_atomic_fetch_xor, \
758758
unsigned long long*: pshmem_ctx_ulonglong_atomic_fetch_xor)(ctx, dst, val, pe)

oshmem/include/shmem.h.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -794,13 +794,13 @@ OSHMEM_DECLSPEC long long shmem_longlong_fadd(long long *target, long long value
794794
/* Atomic Fetch&And */
795795
OSHMEM_DECLSPEC unsigned int shmem_ctx_uint_atomic_fetch_and(shmem_ctx_t ctx, unsigned int *target, unsigned int value, int pe);
796796
OSHMEM_DECLSPEC unsigned long shmem_ctx_ulong_atomic_fetch_and(shmem_ctx_t ctx, unsigned long *target, unsigned long value, int pe);
797-
OSHMEM_DECLSPEC unsigned long long shmem_ctx_ulonglong_atomic_fetch_and(shmem_ctx_t ctx, long long *target, unsigned long long value, int pe);
797+
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);
798798
#if OSHMEM_HAVE_C11
799-
#define shmem_atomic_fetch_and(ctx, dst, val, pe) \
800-
_Generic(&*(dst), \
801-
int*: shmem_ctx_uint_atomic_fetch_and, \
802-
long*: shmem_ctx_ulong_atomic_fetch_and, \
803-
long long*: shmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
799+
#define shmem_atomic_fetch_and(ctx, dst, val, pe) \
800+
_Generic(&*(dst), \
801+
unsigned int*: shmem_ctx_uint_atomic_fetch_and, \
802+
unsigned long*: shmem_ctx_ulong_atomic_fetch_and, \
803+
unsigned long long*: shmem_ctx_ulonglong_atomic_fetch_and)(ctx, dst, val, pe)
804804
#endif
805805

806806
OSHMEM_DECLSPEC unsigned int shmem_uint_atomic_fetch_and(unsigned int *target, unsigned int value, int pe);

0 commit comments

Comments
 (0)