[PATCH -perfbook 3/3] toolsoftrade: Minor fixes

Akira Yokosawa <[email protected]> Mon, 13 Jul 2026 18:57:33 +0900
Newsgroups org.kernel.vger.perfbook
Message-ID <[email protected]>
  - Add "()" to function name.
  - Fill in line counts for potential infinite loop.
  - Typo ("as as exemplified ..." -> "as is exemplified ...").

Signed-off-by: Akira Yokosawa <[email protected]>
---
 toolsoftrade/toolsoftrade.tex | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index c864c484..39c7aa4b 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -1509,7 +1509,7 @@ transformation reduces register pressure.
 But if some other thread changes \co{global_ptr} from non-\co{NULL}
 to \co{NULL} between \clnref{B1,B2} of the transformed code, the
 two comparisons will be against different variables, possibly passing
-\co{do_low} a \co{NULL} pointer.
+\co{do_low()} a \co{NULL} pointer.
 Prevent this by using \co{READ_ONCE()} as follows:
 \end{fcvref}
 \renewcommand{\myfvline}{C\arabic{FancyVerbLine}}
@@ -1732,7 +1732,8 @@ Because \clnref{A1} does a plain load and because the compiler knows that
 compiler could quite reasonably decide to check this variable only once,
 \setlnpref{B}
 resulting in the code shown on \clnrefrange{B1}{B3} of the listing.
-Once entered, the loop on will never exit, regardless of how
+Once entered, the loop on \clnrefrange{B2}{B3}
+will never exit, regardless of how
 many times some other thread stores a non-zero value to \co{need_to_stop}.
 The result will at best be consternation, and might well also entail
 severe physical damage.
@@ -1794,7 +1795,7 @@ indicates this with the mythical \co{nonvolatile_atomic_load()} operation.
 \setlnpref{B}
 However, those working on real-time code must take care because finite
 load fusing is permitted, which can lead to finite loop unrolling,
-as as exemplified by the four-way unrolling on \clnrefrange{B1}{B7} of
+as is exemplified by the four-way unrolling on \clnrefrange{B1}{B7} of
 the listing.
 Although this loop unrolling does not cause a functional failure, the
 unrolled loop might cause the \co{do_something_quickly()} function to be
-- 
2.43.0