[PATCH -perfbook] count: Adjust index marker of _Thread_local

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

 



\apic{} is there for ISO C std APIs.  Use it.

While we are here, fix a couple of minor nits:
   - align //\lnlbl{var:b} in count_end.c;
   - not line-break in front of \footnote{}, indent footnote text.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
Fixes: 24e8f711d2cf ("count: Switch from GCC to C11 thread-local storage")
Cc: Elad Lahav <e2lahav@xxxxxxxxx>
---
 CodeSamples/count/count_end.c |  2 +-
 count/count.tex               | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/CodeSamples/count/count_end.c b/CodeSamples/count/count_end.c
index 5e7b9ee1025c..b6ed851c35a9 100644
--- a/CodeSamples/count/count_end.c
+++ b/CodeSamples/count/count_end.c
@@ -23,7 +23,7 @@
 #include "../api.h"
 
 //\begin{snippet}[labelbase=ln:count:count_end:whole,commandchars=\\\@\$]
-unsigned long _Thread_local counter = 0;		//\lnlbl{var:b}
+unsigned long _Thread_local counter = 0;	//\lnlbl{var:b}
 unsigned long *counterp[NR_THREADS] = { NULL };
 unsigned long finalcount = 0;
 DEFINE_SPINLOCK(final_mutex);			//\lnlbl{var:e}
diff --git a/count/count.tex b/count/count.tex
index 775cf77e90a8..b2de4646b18f 100644
--- a/count/count.tex
+++ b/count/count.tex
@@ -721,12 +721,12 @@ This is the topic of the next section.
 \subsection{Per-Thread-Variable-Based Implementation}
 \label{sec:count:Per-Thread-Variable-Based Implementation}
 
-The C language, since C11, features a \apig{_Thread_local} storage class that
-provides per-thread storage.
-\footnote{\GCC\ provides its own \apig{__thread} storage class, which was used
-in previous versions of this book.
-The two methods for specifying a thread-local variable are interchangeable
-when using \GCC\@.}
+The C language, since C11, features a \apic{_Thread_local} storage class that
+provides per-thread storage.\footnote{
+	\GCC\ provides its own \apig{__thread} storage class, which was used
+	in previous versions of this book.
+	The two methods for specifying a thread-local variable are
+	interchangeable when using \GCC\@.}
 This can be used as shown in
 \cref{lst:count:Per-Thread Statistical Counters} (\path{count_end.c})
 to implement

base-commit: ba01403b34de88d3060e119f899f5eb053c5f162
-- 
2.25.1




[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