THREAD_SETMEM(self, p_nextlock, (pthread_descr) oldstatus);
/* Make sure the store in p_nextlock completes before performing
the compare-and-swap */
- MEMORY_BARRIER();
+ WRITE_MEMORY_BARRIER();
}
} while(! compare_and_swap(&lock->__status, oldstatus, newstatus,
&lock->__spinlock));
res = 0;
}
/* Prevent reordering of store to *ptr above and store to *spinlock below */
- MEMORY_BARRIER();
+ WRITE_MEMORY_BARRIER();
*spinlock = 0;
return res;
}