Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/common/lib/libc/atomic

Module Name:    src
Committed By:   riastradh
Date:           Sat Apr  9 23:38:57 UTC 2022

Modified Files:
        src/common/lib/libc/atomic: atomic_load.c atomic_store.c

Log Message:
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.

To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/atomic/atomic_load.c \

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index