All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] TRIAL: Indentation tweaks around 'verbbox' environment
@ 2016-09-07 15:47 Akira Yokosawa
  2016-09-07 15:58 ` Akira Yokosawa
  0 siblings, 1 reply; 9+ messages in thread
From: Akira Yokosawa @ 2016-09-07 15:47 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 480c37c4749ae4957791636e84e77566265613c2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 8 Sep 2016 00:20:29 +0900
Subject: [PATCH] TRIAL: Indentation tweaks around 'verbbox' environment

This is a trial commit to avoid the side-effect of the "verbbox"
environment, i.e., when it is used just after a section heading,
the following paragraph loses implicit non-indentation.

This commit moves such a "verbbox" environment *before* the section
heading.

There are also cases where two "verbbox" environments are placed just
after section headings. To accommodate such cases, one of such
"verbbox" need to be replaced with "myverbbox" environment to give
another temporary verbatimbox content holder.

This commit includes an example of such a case.

Note that the "myverbbox" environment is provided in recent versions
of the "verbatimbox" package, namely after v3.0.

If you have older versions of "verbatimbox" package, you need to
update. Also the newer one requires the "readarray" package.

Please make sure you have those required packages.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 defer/toyrcu.tex | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/defer/toyrcu.tex b/defer/toyrcu.tex
index cd334ed..01da2cc 100644
--- a/defer/toyrcu.tex
+++ b/defer/toyrcu.tex
@@ -30,9 +30,6 @@ and free-running counters.
 Finally, Section~\ref{defer:Summary of Toy RCU Implementations}
 provides a summary and a list of desirable RCU properties.

-\subsubsection{Lock-Based RCU}
-\label{defer:Lock-Based RCU}
-
 { \scriptsize
 \begin{verbbox}
   1 static void rcu_read_lock(void)
@@ -52,6 +49,10 @@ provides a summary and a list of desirable RCU properties.
  15 }
 \end{verbbox}
 }
+
+\subsubsection{Lock-Based RCU}
+\label{defer:Lock-Based RCU}
+
 \begin{figure}[bp]
 \centering
 \theverbbox
@@ -434,9 +435,6 @@ suitable for a high-stress debugging environment.
 The next section describes a variation on the reference-counting
 scheme that is more favorable to writers.

-\subsubsection{Starvation-Free Counter-Based RCU}
-\label{defer:Starvation-Free Counter-Based RCU}
-
 { \scriptsize
 \begin{verbbox}
   1 DEFINE_SPINLOCK(rcu_gp_lock);
@@ -446,15 +444,9 @@ scheme that is more favorable to writers.
   5 DEFINE_PER_THREAD(int, rcu_read_idx);
 \end{verbbox}
 }
-\begin{figure}[tbp]
-\centering
-\theverbbox
-\caption{RCU Global Reference-Count Pair Data}
-\label{fig:defer:RCU Global Reference-Count Pair Data}
-\end{figure}

 { \scriptsize
-\begin{verbbox}
+\begin{myverbbox}{\verbboxa}
   1 static void rcu_read_lock(void)
   2 {
   3   int i;
@@ -483,11 +475,22 @@ scheme that is more favorable to writers.
  26   }
  27   __get_thread_var(rcu_nesting) = n - 1;
  28 }
-\end{verbbox}
+\end{myverbbox}
 }
+
+\subsubsection{Starvation-Free Counter-Based RCU}
+\label{defer:Starvation-Free Counter-Based RCU}
+
 \begin{figure}[tbp]
 \centering
 \theverbbox
+\caption{RCU Global Reference-Count Pair Data}
+\label{fig:defer:RCU Global Reference-Count Pair Data}
+\end{figure}
+
+\begin{figure}[tbp]
+\centering
+\verbboxa
 \caption{RCU Read-Side Using Global Reference-Count Pair}
 \label{fig:defer:RCU Read-Side Using Global Reference-Count Pair}
 \end{figure}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-12 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 15:47 [PATCH] TRIAL: Indentation tweaks around 'verbbox' environment Akira Yokosawa
2016-09-07 15:58 ` Akira Yokosawa
2016-09-08 11:16   ` Paul E. McKenney
2016-09-10  0:19     ` Akira Yokosawa
2016-09-10 16:28       ` Paul E. McKenney
2016-09-11  2:10         ` Akira Yokosawa
2016-09-11  2:49         ` [RFC PATCH] toyrcu: Enclose 'verbbox' within 'figure' Akira Yokosawa
2016-09-12 14:49           ` Paul E. McKenney
2016-09-12 15:05             ` Akira Yokosawa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.