Merge pull request #224 from updogliu/patch-1

Update atomics.md
pull/245/head
Yuki Okushi 4 years ago committed by GitHub
commit 0cfd181886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -199,9 +199,10 @@ reordered to occur before it.
When thread A releases a location in memory and then thread B subsequently
acquires *the same* location in memory, causality is established. Every write
that happened before A's release will be observed by B after its acquisition.
However no causality is established with any other threads. Similarly, no
causality is established if A and B access *different* locations in memory.
(including non-atomic and relaxed atomic writes) that happened before A's
release will be observed by B after its acquisition. However no causality is
established with any other threads. Similarly, no causality is established
if A and B access *different* locations in memory.
Basic use of release-acquire is therefore simple: you acquire a location of
memory to begin the critical section, and then release that location to end it.

Loading…
Cancel
Save