>From aae17418193531c6d1cf8d7cb4721a4ef8b956d6 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sun, 9 Feb 2020 09:15:39 +0900 Subject: [PATCH 2/2] Define and use \qtco{} to cover string containing breakable sequence Fix problematic behavior of \qco{}, whose width estimation is affected by our breakable sequences of characters "->" and "_". The issue was once fixed by commit 99b31e87fd0d ("Improve definition of \nbco{} and \qco{}"), but it has been reverted because "examplep" package has lost compatibility with up-to-date TeX Live. This commit works around the issue by defining another macro "\qtco{}" and using it instead. Hopefully, we can revert both of the commits when examplep restores its compatibility. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- defer/rcuapi.tex | 2 +- defer/rcufundamental.tex | 2 +- formal/dyntickrcu.tex | 2 +- perfbook.tex | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defer/rcuapi.tex b/defer/rcuapi.tex index 8a9baebc..9a8f3e7d 100644 --- a/defer/rcuapi.tex +++ b/defer/rcuapi.tex @@ -872,7 +872,7 @@ Table~\ref{tab:defer:RCU Diagnostic APIs} shows RCU's diagnostic APIs. The \co{__rcu} marks an RCU-protected pointer, for example, -\qco{struct foo __rcu *p;}. +\qtco{struct foo __rcu *p;}. Pointers that might be passed to \co{rcu_dereference()} can be marked, but pointers holding values returned from \co{rcu_dereference()} should not be. diff --git a/defer/rcufundamental.tex b/defer/rcufundamental.tex index 08d30cc0..16bef732 100644 --- a/defer/rcufundamental.tex +++ b/defer/rcufundamental.tex @@ -136,7 +136,7 @@ emits a single load instruction, just as would the equivalent single-threaded code. The coding restrictions are described in more detail in Section~\ref{sec:memorder:Address- and Data-Dependency Difficulties}, -however, the common case of field selection (\qco{->}) works quite well. +however, the common case of field selection (\qtco{->}) works quite well. Software that does not require the ultimate in read-side performance can instead use C11 acquire loads, which provide the needed ordering and more, albeit at a cost. diff --git a/formal/dyntickrcu.tex b/formal/dyntickrcu.tex index 5465de85..00642584 100644 --- a/formal/dyntickrcu.tex +++ b/formal/dyntickrcu.tex @@ -936,7 +936,7 @@ line of \co{dyntick_nohz()}. \QuickQuiz{} \begin{fcvref}[ln:formal:promela:dyntick:dyntickRCU-irqnn-ssl:dyntick_irq] - Why are \clnref{clr_in_irq,inc_i} (the \qco{in_dyntick_irq = 0;} + Why are \clnref{clr_in_irq,inc_i} (the \qtco{in_dyntick_irq = 0;} and the \qco{i++;}) executed atomically? \end{fcvref} \QuickQuizAnswer{ diff --git a/perfbook.tex b/perfbook.tex index cc936e47..a5ac180b 100644 --- a/perfbook.tex +++ b/perfbook.tex @@ -261,6 +261,7 @@ \newcommand{\qco}[1]{``\nbco{#1}''} % \nbco with quotation marks \newcommand{\tco}[1]{\texttt{\detokenize{#1}}} % for code in tabular environment % \tco{} will break at spaces but not at underscores +\newcommand{\qtco}[1]{``\hbox{\tco{#1}}''} % \tco with quotation marks \newcommand{\lopt}[1]{\tco{-}\tco{-}\tco{#1}} % to avoid "--" to endash conversion \newcommand{\nf}[1]{\textnormal{#1}} % to return to normal font \newcommand{\qop}[1]{{\sffamily #1}} % QC operator such as H, T, S, etc. -- 2.17.1