From 4de216c82cedb29ce7d2b09b0ee0f6e9d15c50d2 Mon Sep 17 00:00:00 2001 From: Zihan Liu Date: Fri, 26 Jun 2020 21:12:40 +0800 Subject: [PATCH] Update atomics.md add "including non-atomic and relaxed atomic writes" for clarity --- src/atomics.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/atomics.md b/src/atomics.md index 4f55392..f0590b3 100644 --- a/src/atomics.md +++ b/src/atomics.md @@ -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.