musl/arch
Rich Felker 3c43c0761e fix missing synchronization in atomic store on i386 and x86_64
despite being strongly ordered, the x86 memory model does not preclude
reordering of loads across earlier stores. while a plain store
suffices as a release barrier, we actually need a full barrier, since
users of a_store subsequently load a waiter count to determine whether
to issue a futex wait, and using a stale count will result in soft
(fail-to-wake) deadlocks. these deadlocks were observed in malloc and
possible with stdio locks and other libc-internal locking.

on i386, an atomic operation on the caller's stack is used as the
barrier rather than performing the store itself using xchg; this
avoids the need to read the cache line on which the store is being
performed. mfence is used on x86_64 where it's always available, and
could be used on i386 with the appropriate cpu model checks if it's
shown to perform better.
2015-07-28 18:40:18 +00:00
..
aarch64 add .text section directive to all crt_arch.h files missing it 2015-05-22 01:50:05 -04:00
arm arm: add vdso support 2015-06-14 04:23:20 +00:00
i386 fix missing synchronization in atomic store on i386 and x86_64 2015-07-28 18:40:18 +00:00
microblaze add .text section directive to all crt_arch.h files missing it 2015-05-22 01:50:05 -04:00
mips socket.h: cleanup/reorder mips and powerpc bits/socket.h 2015-07-21 19:14:58 -04:00
or1k add .text section directive to all crt_arch.h files missing it 2015-05-22 01:50:05 -04:00
powerpc socket.h: cleanup/reorder mips and powerpc bits/socket.h 2015-07-21 19:14:58 -04:00
sh switch to using trap number 31 for syscalls on sh 2015-06-16 15:25:02 +00:00
x32 fix missing synchronization in atomic store on i386 and x86_64 2015-07-28 18:40:18 +00:00
x86_64 fix missing synchronization in atomic store on i386 and x86_64 2015-07-28 18:40:18 +00:00