typedef struct tMPI_Atomic_ptr
{
- volatile char* volatile* value __attribute__ ((aligned(64))); /*!< Volatile, to avoid compiler aliasing */
+ /* volatile char* volatile is not a bug, but means a volatile pointer
+ to a volatile value. This is needed for older versions of
+ xlc. */
+ volatile char* volatile value __attribute__ ((aligned(64))); /*!< Volatile, to avoid compiler aliasing */
}
tMPI_Atomic_ptr_t;
void* newval)
{
int ret;
- volatile char* volatile* oldv = oldval;
- volatile char* volatile* newv = newval;
+ volatile char* volatile oldv = (char*)oldval;
+ volatile char* volatile newv = (char*)newval;
__fence(); /* this one needs to be here to avoid ptr. aliasing issues */
__eieio();