>From a93a5669ea1a5200a59b255f33b32a77bfae8626 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sat, 25 Mar 2017 17:43:02 +0900 Subject: [RFC PATCH 3/7] advsync: Make code snippet in deference to Herman Hollerith float Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- advsync/memorybarriers.tex | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/advsync/memorybarriers.tex b/advsync/memorybarriers.tex index 496ace9..c26e931 100644 --- a/advsync/memorybarriers.tex +++ b/advsync/memorybarriers.tex @@ -2609,10 +2609,13 @@ General barriers provide ``global transitivity'', so that all CPUs will agree on the order of operations. In contrast, a chain of release-acquire pairs provides only ``local transitivity'', so that only those CPUs on the chain are guaranteed to agree on the combined order of the accesses. -For example, switching to C code in deference to Herman Hollerith: +For example, switching to C~code in deference to Herman Hollerith shown in +Figure~\ref{fig:advsync:Example of Local Transitivity (Release-Acquire Pair)}: -{\scriptsize -\begin{verbatim} +\begin{figure}[htbp] +\scriptsize +\centering +\begin{verbbox} 1 int u, v, x, y, z; 2 3 void cpu0(void) @@ -2642,8 +2645,11 @@ For example, switching to C code in deference to Herman Hollerith: 27 smp_mb(); 28 r3 = READ_ONCE(u); 29 } -\end{verbatim} -} +\end{verbbox} +\theverbbox +\caption{Example of Local Transitivity (Release-Acquire Pair)} +\label{fig:advsync:Example of Local Transitivity (Release-Acquire Pair)} +\end{figure} Because \co{cpu0()}, \co{cpu1()}, and \co{cpu2()} participate in a local transitive chain of \co{smp_store_release()}-\co{smp_load_acquire()} pairs, the following -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html