[PATCH 08/13] whymemorybarriers: Remove \co{} in tabular env

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

 



>From 7ca309f9799fd412cc4c09adcf98e46ec4aea61a Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Mon, 2 Jan 2017 08:44:33 +0900
Subject: [PATCH 08/13] whymemorybarriers: Remove \co{} in tabular env

By setting typewriter font as default, this commit removes \co{}
commands. It also proactively uses escapes by "\" for a single
"_" in API.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 appendix/whymb/whymemorybarriers.tex | 52 ++++++++++++++++++------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/appendix/whymb/whymemorybarriers.tex b/appendix/whymb/whymemorybarriers.tex
index 2b6fc97..f97160a 100644
--- a/appendix/whymb/whymemorybarriers.tex
+++ b/appendix/whymb/whymemorybarriers.tex
@@ -1355,20 +1355,20 @@ Each of ``a'', ``b'', and ``c'' are initially zero.
 
 \begin{table*}
 \small
-\centering
+\centering{\tt
 \begin{tabular}{l|l|l}
 	\multicolumn{1}{c|}{CPU~0} &
 		\multicolumn{1}{c|}{CPU~1} &
 			\multicolumn{1}{c}{CPU~2} \\
 	\hline
 	\hline
-	\co{a = 1;}	 &		& \\
-	\co{smp_wmb();} & \co{while (b == 0)}; & \\
-	\co{b = 1;}	 & \co{c = 1;} & \co{z = c;} \\
-			 &		& \co{smp_rmb();} \\
-			 &		& \co{x = a;} \\
-			 &		& \co{assert(z == 0 || x == 1);} \\
-\end{tabular}
+	a = 1;		 &		& \\
+	smp\_wmb(); 	 & while (b == 0); & \\
+	b = 1;		 & c = 1;	& z = c; \\
+			 &		& smp\_rmb(); \\
+			 &		& x = a; \\
+			 &		& assert(z == 0 || x == 1); \\
+\end{tabular}}
 \caption{Memory Barrier Example 1}
 \label{tab:app:whymb:Memory Barrier Example 1}
 \end{table*}
@@ -1415,19 +1415,19 @@ Both ``a'' and ``b'' are initially zero.
 
 \begin{table*}
 \small
-\centering
+\centering{\tt
 \begin{tabular}{l|l|l}
 	\multicolumn{1}{c|}{CPU~0} &
 		\multicolumn{1}{c|}{CPU~1} &
 			\multicolumn{1}{c}{CPU~2} \\
 	\hline
 	\hline
-	\co{a = 1;} & \co{while (a == 0)}; & \\
-		     & \co{smp_mb();}	& \co{y = b;} \\
-		     & \co{b = 1;}	& \co{smp_rmb();} \\
-		     &			& \co{x = a;} \\
-		     &			& \co{assert(y == 0 || x == 1);} \\
-\end{tabular}
+	a = 1;	     & while (a == 0); & \\
+		     & smp\_mb();	& y = b; \\
+		     & b = 1;		& smp\_rmb(); \\
+		     &			& x = a; \\
+		     &			& assert(y == 0 || x == 1); \\
+\end{tabular}}
 \caption{Memory Barrier Example 2}
 \label{tab:app:whymb:Memory Barrier Example 2}
 \end{table*}
@@ -1457,23 +1457,23 @@ All variables are initially zero.
 
 \begin{table*}
 \scriptsize
-\centering
+\centering{\tt
 \begin{tabular}{r|l|l|l}
 	& \multicolumn{1}{c|}{CPU~0} &
 		\multicolumn{1}{c|}{CPU~1} &
 			\multicolumn{1}{c}{CPU~2} \\
 	\hline
 	\hline
- 1 &	\co{a = 1;} &			& \\
- 2 &	\co{smb_wmb();} &		& \\
- 3 &	\co{b = 1;} & \co{while (b == 0)}; & \co{while (b == 0)}; \\
- 4 &		     & \co{smp_mb();}	& \co{smp_mb();} \\
- 5 &		     & \co{c = 1;}	& \co{d = 1;} \\
- 6 &	\co{while (c == 0);} &		& \\
- 7 &	\co{while (d == 0);} &		& \\
- 8 &	\co{smp_mb();} &		& \\
- 9 &	\co{e = 1;} &			& \co{assert(e == 0 || a == 1);} \\
-\end{tabular}
+ 1 &	a = 1; &			& \\
+ 2 &	smb\_wmb();	&		& \\
+ 3 &	b = 1;		& while (b == 0); & while (b == 0); \\
+ 4 &			& smp\_mb();	& smp\_mb(); \\
+ 5 &			& c = 1;	& d = 1; \\
+ 6 &	while (c == 0); &		& \\
+ 7 &	while (d == 0); &		& \\
+ 8 &	smp\_mb();	&		& \\
+ 9 &	e = 1; &			& assert(e == 0 || a == 1); \\
+\end{tabular}}
 \caption{Memory Barrier Example 3}
 \label{tab:app:whymb:Memory Barrier Example 3}
 \end{table*}
-- 
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux