aboutsummaryrefslogtreecommitdiff
path: root/src/a.tex
diff options
context:
space:
mode:
Diffstat (limited to 'src/a.tex')
-rw-r--r--src/a.tex12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/a.tex b/src/a.tex
index aa1e023..65d8b50 100644
--- a/src/a.tex
+++ b/src/a.tex
@@ -343,12 +343,6 @@ implement {\em release}, both imply additional unnecessary ordering as
compared to AMOs with the corresponding {\em aq} or {\em rl} bit set.
\end{commentary}
-AMOs can also be used to provide sequentially consistent loads and
-stores. A sequentially consistent load can be implemented as an
-AMOADD of x0 with both {\em aq} and {\em rl} set. A sequentially
-consistent store can be implemented as an AMOSWAP that writes the old
-value to x0 and has both {\em aq} and {\em rl} set.
-
An example code sequence for a critical section guarded by a
test-and-set spinlock is shown in Figure~\ref{critical}. Note the
first AMO is marked {\em aq} to order the lock acquisition before the
@@ -383,3 +377,9 @@ lock value matches the swap value, to avoid dirtying a cache line held
in a shared or exclusive clean state. The effect is similar to a
test-and-test-and-set lock but with shorter code paths.
\end{commentary}
+
+The instructions in the ``A'' extension can also be used to provide
+sequentially consistent loads and stores. A sequentially consistent load can
+be implemented as an LR with both {\em aq} and {\em rl} set. A sequentially
+consistent store can be implemented as an AMOSWAP that writes the old value to
+x0 and has both {\em aq} and {\em rl} set.