Typo fixes
cover Typo fixes
From 98c6fbbe2a7b04bc1ad11d70d96995425d8635de Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 24 Aug 2016 20:43:42 +0900
Subject: [PATCH 0/3] Typo fixes
Hi,
This series consists of typo fixes.
1st patch is the result of a variant of hypen2endash.sh script. No, this patch does not convert hyphens to endashes, but replaces spaces in "lines nn-mm" and "Lines nn-mm" with tildes. It also corrects typos such as "line^nn-mm" to "lines~nn-mm". Modified sed script can be found in the commit message.
2nd patch adjusts plurality of verbs in appendix/rcuimpl/rcutreewt.tex after the 1st patch. This file is not referenced any more, so this fix may be unnecessary.
3rd patch fixes typos I noticed while reviewing Chapter 7.
Thanks, Akira
Akira Yokosawa (3):
treewide: Use nbsp after 'Lines' and 'lines'
appendix/rcuimpl: Adjust plurality of verb
locking: Typo fixes
appendix/questions/after.tex | 4 +-- appendix/rcuimpl/rcutreewt.tex | 8 +++--- appendix/rcuimpl/srcu.tex | 2 +- appendix/whymb/whymemorybarriers.tex | 2 +- datastruct/datastruct.tex | 2 +- formal/dyntickrcu.tex | 2 +- formal/spinhint.tex | 56 ++++++++++++++++++------------------ locking/locking.tex | 8 +++--- toolsoftrade/toolsoftrade.tex | 2 +- 9 files changed, 43 insertions(+), 43 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 treewide: Use nbsp after 'Lines' and 'lines'
From 862b7d5149cc29c5ddd29e3df14411b7130e0f89 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 14 Aug 2016 14:42:19 +0900
Subject: [PATCH 1/3] treewide: Use nbsp after 'Lines' and 'lines'
This commit is the result of applying a modified version of "hyphen2endash.sh", whose substitution rules are:
sed -e 's/Lines \([0-9]\+\)-\([0-9]\+\)/Lines~\1-\2/g' \
-e 's/lines \([0-9]\+\)-\([0-9]\+\)/lines~\1-\2/g' \
-e 's/Line~\([0-9]\+\)-\([0-9]\+\)/Lines~\1-\2/g' \
-e 's/Line \([0-9]\+\)-\([0-9]\+\)/Lines~\1-\2/g' \
-e 's/line~\([0-9]\+\)-\([0-9]\+\)/lines~\1-\2/g' \
-e 's/line \([0-9]\+\)-\([0-9]\+\)/lines~\1-\2/g' \
-e 's/\/\* Lines~\([0-9]\+\)-\([0-9]\+\) \*\//\/\* Lines \1-\2 \*\//g'3rd--6th rules fix typos such as "Line nn-mm".
The last rule is to preserve "Lines nn-mm" in comments within code snippets.
--- appendix/questions/after.tex | 4 +-- appendix/rcuimpl/rcutreewt.tex | 8 +++--- appendix/rcuimpl/srcu.tex | 2 +- appendix/whymb/whymemorybarriers.tex | 2 +- datastruct/datastruct.tex | 2 +- formal/dyntickrcu.tex | 2 +- formal/spinhint.tex | 56 ++++++++++++++++++------------------ toolsoftrade/toolsoftrade.tex | 2 +- 8 files changed, 39 insertions(+), 39 deletions(-)
appendix/questions/after.tex +2 -2
@@ -192,8 +192,8 @@ This lock must also be released after line 13 in Figure~\ref{fig:app:questions:After Producer Function} and after line 17 in Figure~\ref{fig:app:questions:After Consumer Function}. -These locks cause the code segments in line 10-13 of -Figure~\ref{fig:app:questions:After Producer Function} and in line 13-17 of +These locks cause the code segments in lines~10-13 of +Figure~\ref{fig:app:questions:After Producer Function} and in lines~13-17 of Figure~\ref{fig:app:questions:After Consumer Function} to {\em exclude} each other, in other words, to run atomically with respect to each other. This is represented in
appendix/rcuimpl/rcutreewt.tex +4 -4
@@ -1049,7 +1049,7 @@ line~11 invokes \co{cpu_needs_another_gp()} to see if the current CPU has callbacks that need another RCU grace period to elapse, line~13 checks to see if the current grace period has ended, line~15 checks to see if a new grace period has started, -and, finally, lines 17-22 check to see if it is time to attempt +and, finally, lines~17-22 check to see if it is time to attempt to force holdout CPUs to pass through a quiescent state. This latter check breaks down as follows: (1) lines~17-18 check to see if there is a grace period in progress, and, if so, lines~19-22
@@ -2003,7 +2003,7 @@ If so, lines~31-38 move them. Line~31 splices the list of callbacks onto the end of the running CPU's list. Lines~32-33 sets the running CPU's callback tail pointer to that of -the CPU going offline, and then lines 34-36 initialize the going-offline +the CPU going offline, and then lines~34-36 initialize the going-offline CPU's list to be empty. Line~37 adds the length of the going-offline CPU's callback list to that of the currently running CPU, and, finally, line 38 zeroes the
@@ -3754,7 +3754,7 @@ to record a quiescent state for any that are currently in dynticks-idle state (but not currently in an irq or NMI handler). Lines~41-42 serve to inform gcc that this branch of the switch statement is dead code for non-\co{CONFIG_NO_HZ} kernels. -Lines 43-45 invoke \co{rcu_process_dyntick()} in order to invoke +Lines~43-45 invoke \co{rcu_process_dyntick()} in order to invoke \co{dyntick_save_progress_counter()} for each CPU that has not yet passed through a quiescent state for the current grace period, exiting \co{force_quiescent_state()} if the grace period ends in
@@ -3906,7 +3906,7 @@ duration, with line~14 invoking \co{print_other_cpu_stall()} if so. Figure~\ref{fig:app:rcuimpl:rcutreewt:Code for print-cpu-stall} shows the code for \co{print_cpu_stall()}. -Line~6-11 prints a console message and dumps the current CPU's stack, +Lines~6-11 prints a console message and dumps the current CPU's stack, while lines~12-17 compute the time to the next CPU stall warning, should the grace period stretch on that much additional time.
appendix/rcuimpl/srcu.tex +1 -1
@@ -351,7 +351,7 @@ could be accomplished without a reboot. The \co{readside()} function overlaps an RCU and an SRCU read-side critical section, with the former running from lines~5-11 and the -latter running from lines 10-13. +latter running from lines~10-13. The RCU read-side critical section uses Pure % % RCU\IfInBook{ (see Section~\ref{sec:advsync:Pure RCU})}
appendix/whymb/whymemorybarriers.tex +1 -1
@@ -1713,7 +1713,7 @@ code shown in Figure~\ref{fig:app:whymb:Insert and Lock-Free Search}. This \co{smp_wmb()} on line~9 of this figure guarantees that the element initialization -in lines 6-8 is executed before the element is added to the +in lines~6-8 is executed before the element is added to the list on line~10, so that the lock-free search will work correctly. That is, it makes this guarantee on all CPUs {\em except} Alpha.
datastruct/datastruct.tex +1 -1
@@ -275,7 +275,7 @@ arbitrary hash functions, with the key-comparison function passed in via \co{cmp()}, in a manner similar to \co{qsort()}. Line~11 maps from the hash value to a pointer to the corresponding hash bucket. -Each pass through the loop spanning line~12-19 examines one element +Each pass through the loop spanning lines~12-19 examines one element of the bucket's hash chain. Line~15 checks to see if the hash values match, and if not, line~16 proceeds to the next element.
formal/dyntickrcu.tex +1 -1
@@ -1215,7 +1215,7 @@ to model an interrupt handler: \end{verbatim} } -The loop from line~7-48 models up to \co{MAX_DYNTICK_LOOP_IRQ} +The loop from lines~7-48 models up to \co{MAX_DYNTICK_LOOP_IRQ} interrupts, with lines~8 and 9 forming the loop condition and line~45 incrementing the control variable. Line~10 tells \co{dyntick_nohz()} that an interrupt handler
formal/spinhint.tex +28 -28
153 lines not on this page · raw message
toolsoftrade/toolsoftrade.tex +1 -1
@@ -615,7 +615,7 @@ Lines~16-23 repeatedly check the value of \co{x}, printing the new value each time that it changes. Line~22 sleeps for one millisecond, which allows this demonstration to run nicely on a uniprocessor machine. -Line~24-27 release the \co{pthread_mutex_t}, again checking for +Lines~24-27 release the \co{pthread_mutex_t}, again checking for errors and exiting the program if any occur. Finally, line~28 returns \co{NULL}, again to match the function type required by \co{pthread_create()}.
Signature · 1 line
1.9.1
PATCH 2/3 appendix/rcuimpl: Adjust plurality of verb
In reply to Akira YokosawaFrom a8bfa8fee42830a350729a4b96d1c662ea8cb7df Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 14 Aug 2016 15:06:08 +0900
Subject: [PATCH 2/3] appendix/rcuimpl: Adjust plurality of verb
This commit is to adjust plurality of verbs in accordance with the changes made in the previous commit.
--- appendix/rcuimpl/rcutreewt.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
appendix/rcuimpl/rcutreewt.tex +1 -1
@@ -3906,7 +3906,7 @@ duration, with line~14 invoking \co{print_other_cpu_stall()} if so. Figure~\ref{fig:app:rcuimpl:rcutreewt:Code for print-cpu-stall} shows the code for \co{print_cpu_stall()}. -Lines~6-11 prints a console message and dumps the current CPU's stack, +Lines~6-11 print a console message and dump the current CPU's stack, while lines~12-17 compute the time to the next CPU stall warning, should the grace period stretch on that much additional time.
Signature · 1 line
1.9.1
PATCH 3/3 locking: Typo fixes
In reply to Akira YokosawaFrom 98c6fbbe2a7b04bc1ad11d70d96995425d8635de Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Wed, 24 Aug 2016 20:41:41 +0900
Subject: [PATCH 3/3] locking: Typo fixes
--- locking/locking.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
locking/locking.tex +4 -4
@@ -234,7 +234,7 @@ containing locks from both the library and the caller. \begin{enumerate} \item If one of the library function's arguments is a pointer to a lock that this library function acquires, and if - the library function holds one if its locks while + the library function holds one of its locks while acquiring the caller's lock, then we could have a deadlock cycle involving both caller and library locks. \item If one of the library functions returns a pointer to
@@ -469,7 +469,7 @@ Chapter~\ref{chp:Deferred Processing}. \subsubsection{Locking Hierarchies and Pointers to Locks} \label{sec:locking:Locking Hierarchies and Pointers to Locks} -Althought there are some exceptions, an external API containing a pointer +Although there are some exceptions, an external API containing a pointer to a lock is very often a misdesigned API. Handing an internal lock to some other software component is after all the antithesis of information hiding, which is in turn a key design
@@ -495,7 +495,7 @@ prevents hangs due to lost wakeups. \QuickQuizAnswer{ Absolutely not! - Consider the a program that acquires \co{mutex_a}, and then + Consider a program that acquires \co{mutex_a}, and then \co{mutex_b}, in that order, and then passes \co{mutex_a} to \co{pthread_cond_wait}. Now, \co{pthread_cond_wait} will release \co{mutex_a}, but
@@ -622,7 +622,7 @@ must release the locks and start over. the code will always retry, never making forward progress. This is termed ``livelock'' if no thread makes any forward progress or ``starvation'' - if some threads make forward progress but other do not + if some threads make forward progress but others do not (see Section~\ref{sec:locking:Livelock and Starvation}). } \QuickQuizEnd
Signature · 1 line
1.9.1
Quoted 15 lines · Akira Yokosawa
Quoted 1 line
From
98c6fbbe2a7b04bc1ad11d70d96995425d8635deMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Wed, 24 Aug 2016 20:43:42 +0900
Subject: [PATCH 0/3] Typo fixesHi,
This series consists of typo fixes.
1st patch is the result of a variant of
hypen2endash.shscript. No, this patch does not convert hyphens to endashes, but replaces spaces in "lines nn-mm" and "Lines nn-mm" with tildes. It also corrects typos such as "line^nn-mm" to "lines~nn-mm". Modified sed script can be found in the commit message.
Quoted 5 lines
2nd patch adjusts plurality of verbs in appendix/rcuimpl/rcutreewt.tex after the 1st patch. This file is not referenced any more, so this fix may be unnecessary.
3rd patch fixes typos I noticed while reviewing Chapter 7.
All applied, thank you!
I followed up patch 1 with a few "line N" and "Line N" changes in those same files as well.
Thanx, Paul
Quoted 21 lines
Thanks, Akira
Akira Yokosawa (3):
treewide: Use nbsp after 'Lines' and 'lines'
appendix/rcuimpl: Adjust plurality of verb
locking: Typo fixesappendix/questions/after.tex | 4 +-- appendix/rcuimpl/rcutreewt.tex | 8 +++--- appendix/rcuimpl/srcu.tex | 2 +- appendix/whymb/whymemorybarriers.tex | 2 +- datastruct/datastruct.tex | 2 +- formal/dyntickrcu.tex | 2 +- formal/spinhint.tex | 56 ++++++++++++++++++------------------ locking/locking.tex | 8 +++--- toolsoftrade/toolsoftrade.tex | 2 +- 9 files changed, 43 insertions(+), 43 deletions(-)Signature · 1 line
1.9.1