Now
MAIN commitmail json YAML
src/common/lib/libc/atomic/atomic_load.c@1.4
/
diff
/
nxr@1.4
src/common/lib/libc/atomic/atomic_store.c@1.4 / diff / nxr@1.4
src/common/lib/libc/atomic/atomic_store.c@1.4 / diff / nxr@1.4
libc/atomic: Fix membars in __atomic_load/store_* stubs.
- membar_enter/exit ordering was backwards.
- membar_enter doesn't make any sense for load anyway.
- Switch to membar_release for store and membar_acquire for load.
The only sensible orderings for a simple load or store are acquire or
release, respectively, or sequential consistency. This never
provided correct sequential consistency before -- we should really
make it conditional on memmodel but I don't know offhand what the
values of memmodel might be and this is at least better than before.
- membar_enter/exit ordering was backwards.
- membar_enter doesn't make any sense for load anyway.
- Switch to membar_release for store and membar_acquire for load.
The only sensible orderings for a simple load or store are acquire or
release, respectively, or sequential consistency. This never
provided correct sequential consistency before -- we should really
make it conditional on memmodel but I don't know offhand what the
values of memmodel might be and this is at least better than before.