diff --git a/oshmem/include/pshmem.h b/oshmem/include/pshmem.h index 8c510c8de4..739bd027cc 100644 --- a/oshmem/include/pshmem.h +++ b/oshmem/include/pshmem.h @@ -253,17 +253,17 @@ OSHMEM_DECLSPEC int pshmem_test_lock(long *lock); /* * P2P sync routines */ -OSHMEM_DECLSPEC void pshmem_short_wait(short *addr, short value); -OSHMEM_DECLSPEC void pshmem_int_wait(int *addr, int value); -OSHMEM_DECLSPEC void pshmem_long_wait(long *addr, long value); -OSHMEM_DECLSPEC void pshmem_longlong_wait(long long *addr, long long value); -OSHMEM_DECLSPEC void pshmem_wait(long *addr, long value); +OSHMEM_DECLSPEC void pshmem_short_wait(volatile short *addr, short value); +OSHMEM_DECLSPEC void pshmem_int_wait(volatile int *addr, int value); +OSHMEM_DECLSPEC void pshmem_long_wait(volatile long *addr, long value); +OSHMEM_DECLSPEC void pshmem_longlong_wait(volatile long long *addr, long long value); +OSHMEM_DECLSPEC void pshmem_wait(volatile long *addr, long value); -OSHMEM_DECLSPEC void pshmem_short_wait_until(short *addr, int cmp, short value); -OSHMEM_DECLSPEC void pshmem_int_wait_until(int *addr, int cmp, int value); -OSHMEM_DECLSPEC void pshmem_long_wait_until(long *addr, int cmp, long value); -OSHMEM_DECLSPEC void pshmem_longlong_wait_until(long long *addr, int cmp, long long value); -OSHMEM_DECLSPEC void pshmem_wait_until(long *addr, int cmp, long value); +OSHMEM_DECLSPEC void pshmem_short_wait_until(volatile short *addr, int cmp, short value); +OSHMEM_DECLSPEC void pshmem_int_wait_until(volatile int *addr, int cmp, int value); +OSHMEM_DECLSPEC void pshmem_long_wait_until(volatile long *addr, int cmp, long value); +OSHMEM_DECLSPEC void pshmem_longlong_wait_until(volatile long long *addr, int cmp, long long value); +OSHMEM_DECLSPEC void pshmem_wait_until(volatile long *addr, int cmp, long value); /* * Barrier sync routines diff --git a/oshmem/include/shmem.h.in b/oshmem/include/shmem.h.in index 831bfdc33f..e92eafee78 100644 --- a/oshmem/include/shmem.h.in +++ b/oshmem/include/shmem.h.in @@ -316,17 +316,17 @@ OSHMEM_DECLSPEC int shmem_test_lock(long *lock); /* * P2P sync routines */ -OSHMEM_DECLSPEC void shmem_short_wait(short *addr, short value); -OSHMEM_DECLSPEC void shmem_int_wait(int *addr, int value); -OSHMEM_DECLSPEC void shmem_long_wait(long *addr, long value); -OSHMEM_DECLSPEC void shmem_longlong_wait(long long *addr, long long value); -OSHMEM_DECLSPEC void shmem_wait(long *addr, long value); +OSHMEM_DECLSPEC void shmem_short_wait(volatile short *addr, short value); +OSHMEM_DECLSPEC void shmem_int_wait(volatile int *addr, int value); +OSHMEM_DECLSPEC void shmem_long_wait(volatile long *addr, long value); +OSHMEM_DECLSPEC void shmem_longlong_wait(volatile long long *addr, long long value); +OSHMEM_DECLSPEC void shmem_wait(volatile long *addr, long value); -OSHMEM_DECLSPEC void shmem_short_wait_until(short *addr, int cmp, short value); -OSHMEM_DECLSPEC void shmem_int_wait_until(int *addr, int cmp, int value); -OSHMEM_DECLSPEC void shmem_long_wait_until(long *addr, int cmp, long value); -OSHMEM_DECLSPEC void shmem_longlong_wait_until(long long *addr, int cmp, long long value); -OSHMEM_DECLSPEC void shmem_wait_until(long *addr, int cmp, long value); +OSHMEM_DECLSPEC void shmem_short_wait_until(volatile short *addr, int cmp, short value); +OSHMEM_DECLSPEC void shmem_int_wait_until(volatile int *addr, int cmp, int value); +OSHMEM_DECLSPEC void shmem_long_wait_until(volatile long *addr, int cmp, long value); +OSHMEM_DECLSPEC void shmem_longlong_wait_until(volatile long long *addr, int cmp, long long value); +OSHMEM_DECLSPEC void shmem_wait_until(volatile long *addr, int cmp, long value); /* * Barrier sync routines diff --git a/oshmem/shmem/c/shmem_wait.c b/oshmem/shmem/c/shmem_wait.c index 7d1b64f171..8af76e2438 100644 --- a/oshmem/shmem/c/shmem_wait.c +++ b/oshmem/shmem/c/shmem_wait.c @@ -57,11 +57,11 @@ #include "oshmem/shmem/c/profile/defines.h" #endif -SHMEM_TYPE_WAIT(, long, SHMEM_LONG, shmem) -SHMEM_TYPE_WAIT(_short, short, SHMEM_SHORT, shmem) -SHMEM_TYPE_WAIT(_int, int, SHMEM_INT, shmem) -SHMEM_TYPE_WAIT(_long, long, SHMEM_LONG, shmem) -SHMEM_TYPE_WAIT(_longlong, long long, SHMEM_LLONG, shmem) +SHMEM_TYPE_WAIT(, volatile long, SHMEM_LONG, shmem) +SHMEM_TYPE_WAIT(_short, volatile short, SHMEM_SHORT, shmem) +SHMEM_TYPE_WAIT(_int, volatile int, SHMEM_INT, shmem) +SHMEM_TYPE_WAIT(_long, volatile long, SHMEM_LONG, shmem) +SHMEM_TYPE_WAIT(_longlong, volatile long long, SHMEM_LLONG, shmem) SHMEM_TYPE_WAIT(_int32, int32_t, SHMEM_INT32_T, shmemx) SHMEM_TYPE_WAIT(_int64, int64_t, SHMEM_INT64_T, shmemx) @@ -82,10 +82,10 @@ SHMEM_TYPE_WAIT(_int64, int64_t, SHMEM_INT64_T, shmemx) return ; \ } -SHMEM_TYPE_WAIT_UNTIL(, long, SHMEM_LONG, shmem) -SHMEM_TYPE_WAIT_UNTIL(_short, short, SHMEM_SHORT, shmem) -SHMEM_TYPE_WAIT_UNTIL(_int, int, SHMEM_INT, shmem) -SHMEM_TYPE_WAIT_UNTIL(_long, long, SHMEM_LONG, shmem) -SHMEM_TYPE_WAIT_UNTIL(_longlong, long long, SHMEM_LLONG, shmem) +SHMEM_TYPE_WAIT_UNTIL(, volatile long, SHMEM_LONG, shmem) +SHMEM_TYPE_WAIT_UNTIL(_short, volatile short, SHMEM_SHORT, shmem) +SHMEM_TYPE_WAIT_UNTIL(_int, volatile int, SHMEM_INT, shmem) +SHMEM_TYPE_WAIT_UNTIL(_long, volatile long, SHMEM_LONG, shmem) +SHMEM_TYPE_WAIT_UNTIL(_longlong, volatile long long, SHMEM_LLONG, shmem) SHMEM_TYPE_WAIT_UNTIL(_int32, int32_t, SHMEM_INT32_T, shmemx) SHMEM_TYPE_WAIT_UNTIL(_int64, int64_t, SHMEM_INT64_T, shmemx) diff --git a/oshmem/shmem/man/man3/shmem_wait.3in b/oshmem/shmem/man/man3/shmem_wait.3in index f1c6aa5769..c664ae4c1a 100644 --- a/oshmem/shmem/man/man3/shmem_wait.3in +++ b/oshmem/shmem/man/man3/shmem_wait.3in @@ -35,27 +35,27 @@ C or C++: .Vb #include -void shmem_int_wait(int *var, int value); +void shmem_int_wait(volatile int *var, int value); -void shmem_int_wait_until(int *var, int cond, int value); +void shmem_int_wait_until(volatile int *var, int cond, int value); -void shmem_long_wait(long *var, long value); +void shmem_long_wait(volatile long *var, long value); -void shmem_long_wait_until(long *var, int cond, long value); +void shmem_long_wait_until(volatile long *var, int cond, long value); -void shmem_longlong_wait(long long *var, long long value); +void shmem_longlong_wait(volatile long long *var, long long value); -void shmem_longlong_wait_until(long long *var, int cond, +void shmem_longlong_wait_until(volatile long long *var, int cond, long long value); -void shmem_short_wait(short *var, short value); +void shmem_short_wait(volatile short *var, short value); -void shmem_short_wait_until(short *var, int cond, +void shmem_short_wait_until(volatile short *var, int cond, short value); -void shmem_wait(long *ivar, long cmp_value); +void shmem_wait(volatile long *ivar, long cmp_value); -void shmem_wait_until(long *ivar, int cmp, long value); +void shmem_wait_until(volatile long *ivar, int cmp, long value); .Ve Fortran: .Vb