[PATCH -perfbook 3/6] defer: POC of hierarchical index with modifier part's case preserved

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

 



\IXhmr{}{} and \IXhmrpl{}{} are for index of

   Critical section, RCU read-side

, where the modifier part needs to preserve case (in this example
"RCU").

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 defer/rcufundamental.tex |  2 +-
 defer/rcuintro.tex       |  2 +-
 perfbook-lt.tex          | 14 ++++++++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/defer/rcufundamental.tex b/defer/rcufundamental.tex
index ed2ce21c..d7695a1c 100644
--- a/defer/rcufundamental.tex
+++ b/defer/rcufundamental.tex
@@ -198,7 +198,7 @@ scenarios, and memory-leak hazards that are inherent in schemes
 using explicit tracking.
 
 In RCU's case, each of the things waited on is called an
-\emph{RCU read-side critical section}.
+\emph{\IXBhmr{RCU read-side}{critical section}}.
 As noted in
 \cref{tab:defer:Core RCU API}, an RCU read-side critical
 section starts with an \co{rcu_read_lock()} primitive, and ends with a
diff --git a/defer/rcuintro.tex b/defer/rcuintro.tex
index 069ccfd7..bc968ae3 100644
--- a/defer/rcuintro.tex
+++ b/defer/rcuintro.tex
@@ -196,7 +196,7 @@ The full API is covered in \cref{sec:defer:RCU Linux-Kernel API}.
 
 Three members of the core APIs are used by readers.
 The \apik{rcu_read_lock()} and \apik{rcu_read_unlock()} functions delimit
-RCU read-side critical sections.
+\IXhmrpl{RCU read-side}{critical section}.
 These may be nested, so that one \co{rcu_read_lock()}--\co{rcu_read_unlock()}
 pair can be enclosed within another.
 In this case, the nested set of RCU read-side critical sections act as
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 79de56c1..ff257bcc 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -182,15 +182,21 @@
   \lowercase{\def\tempb{#2}}%
   \expandafter\index\expandafter{\temp@\makefirstuc{\temp}!\tempb}%
 }
+\newcommand{\ucindexhm}[2]{%
+  \lowercase{\def\temp{#1}}%
+  \expandafter\index\expandafter{\temp@\makefirstuc{\temp}!#2}%
+}
 \newcommand{\indexhraw}[2]{%
   \expandafter\index\expandafter{#1!#2}%
 }
 \IfIndexHier{
 \newcommand{\indexh}[3]{\ucindexh{#2}{#3}}
 \newcommand{\indexhr}[3]{\indexhraw{#2}{#3}}
+\newcommand{\indexhmr}[3]{\ucindexhm{#2}{#3}}
 }{
 \newcommand{\indexh}[3]{\ucindex{#1}}
 \newcommand{\indexhr}[3]{\index{#1}}
+\newcommand{\indexhmr}[3]{\index{#1}}
 }
 
 \newcommand{\IX}[1]{\ucindex{#1}\hlindex{#1}} % put with first letter capitalized into general index
@@ -203,8 +209,12 @@
 \newcommand{\IXh}[2]{\indexh{#1 #2}{#2}{#1}\hlindex{#1 #2}}
 \newcommand{\IXhpl}[2]{\indexh{#1 #2}{#2}{#1}\hlindex{#1 #2s}}
 \newcommand{\IXhr}[2]{\indexhr{#1 #2}{#2}{#1}\hlindex{#1 #2}}
+\newcommand{\IXhrpl}[2]{\indexhr{#1 #2}{#2}{#1}\hlindex{#1 #2s}}
+\newcommand{\IXhmr}[2]{\indexhmr{#1 #2}{#2}{#1}\hlindex{#1 #2}}
+\newcommand{\IXhmrpl}[2]{\indexhmr{#1 #2}{#2}{#1}\hlindex{#1 #2s}}
 \newcommand{\IXalth}[3]{\indexh{#1}{#3}{#2}\hlindex{#1}}
 \newcommand{\IXalthr}[3]{\indexhr{#1}{#3}{#2}\hlindex{#1}}
+\newcommand{\IXalthmr}[3]{\indexhmr{#1}{#3}{#2}\hlindex{#1}}
 % page number in bold face
 \newcommand{\BF}[1]{\textbf{#1}}
 \newcommand{\IXB}[1]{\ucindex{#1|BF}\hlindex{#1}} % put with first letter capitalized into general index
@@ -217,8 +227,12 @@
 \newcommand{\IXBh}[2]{\indexh{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2}}
 \newcommand{\IXBhpl}[2]{\indexh{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2s}}
 \newcommand{\IXBhr}[2]{\indexhr{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2}}
+\newcommand{\IXBhrpl}[2]{\indexhr{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2s}}
+\newcommand{\IXBhmr}[2]{\indexhmr{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2}}
+\newcommand{\IXBhmrpl}[2]{\indexhmr{#1 #2|BF}{#2|BF}{#1}\hlindex{#1 #2s}}
 \newcommand{\IXBalth}[3]{\indexh{#1|BF}{#3|BF}{#2}\hlindex{#1}}
 \newcommand{\IXBalthr}[3]{\indexhr{#1|BF}{#3|BF}{#2}\hlindex{#1}}
+\newcommand{\IXBalthmr}[3]{\indexhmr{#1|BF}{#3|BF}{#2}\hlindex{#1}}
 %
 \newcommand{\apic}[1]{\hlindex{\co{#1}}\sindex[api]{#1@\co{#1}\categapi{c}}}
 \newcommand{\apig}[1]{\hlindex{\co{#1}}\sindex[api]{#1@\co{#1}\categapi{g}}}
-- 
2.17.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