All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Misc updates and fixes
@ 2017-01-28 11:06 Akira Yokosawa
  2017-01-28 11:08 ` [PATCH 1/4] Update hyphen-to-endash scripts Akira Yokosawa
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-01-28 11:06 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 11f5734bf4b31fbb51cd6ec603d680a8b3f4f99c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 28 Jan 2017 20:01:42 +0900
Subject: [PATCH 0/4] Misc updates and fixes

Hi Paul,

This is a collection of random updates and fixes.

Patch 4 replaces non-hyphenation dashes with math mode minus signs.
As you know, I dislike such uses of dashes in LaTeX source. ;-)

                                    Thanks, Akira
--
Akira Yokosawa (4):
  Update hyphen-to-endash scripts
  advsync/memorybarriers: Use American spelling (initialize)
  together: Typo fix (a RCU ... -> an RCU ...)
  Use math mode minus signs for dashes in tables

 advsync/memorybarriers.tex           |  2 +-
 appendix/whymb/whymemorybarriers.tex | 20 ++++++++++----------
 together/applyrcu.tex                |  2 +-
 together/refcnt.tex                  |  8 ++++----
 utilities/bibhyphen2endash.sh        | 27 +++++++++++++++++++++++++++
 utilities/dohyphen2endash.sh         | 12 ++++++++++++
 utilities/hyphen2endash.sh           |  4 +++-
 7 files changed, 58 insertions(+), 17 deletions(-)
 create mode 100644 utilities/bibhyphen2endash.sh

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] Update hyphen-to-endash scripts
  2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
@ 2017-01-28 11:08 ` Akira Yokosawa
  2017-01-28 11:11 ` [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize) Akira Yokosawa
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-01-28 11:08 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From b1654e9d60fe96de07c50e2293205495d04358f3 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Tue, 3 Jan 2017 19:03:04 +0900
Subject: [PATCH 1/4] Update hyphen-to-endash scripts

Add script for converting hyphen to endash in .bib files.
Also add a rule for auto updated year range in legal page.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/bibhyphen2endash.sh | 27 +++++++++++++++++++++++++++
 utilities/dohyphen2endash.sh  | 12 ++++++++++++
 utilities/hyphen2endash.sh    |  4 +++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 utilities/bibhyphen2endash.sh

diff --git a/utilities/bibhyphen2endash.sh b/utilities/bibhyphen2endash.sh
new file mode 100644
index 0000000..1bd8b3e
--- /dev/null
+++ b/utilities/bibhyphen2endash.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Find hyphens used for number range and replace them with en dashes.
+# (for bibliography pages field, conversion to en dash is done by BiBTeX)
+#
+# Replacement candidate
+#   Volumes mm-nn -> Volumes mm--nn
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, you can access it online at
+# http://www.gnu.org/licenses/gpl-2.0.html.
+#
+# Copyright (C) Akira Yokosawa, 2017
+#
+# Authors: Akira Yokosawa <akiyks@gmail.com>
+
+cat $1 | sed -e 's/Volumes \([0-9]\+\)-\([0-9]\+\)/Volumes \1--\2/g'
diff --git a/utilities/dohyphen2endash.sh b/utilities/dohyphen2endash.sh
index fabecb5..3be7d47 100644
--- a/utilities/dohyphen2endash.sh
+++ b/utilities/dohyphen2endash.sh
@@ -71,4 +71,16 @@ do
 		cp -f $tmpf $basename.tex
 	fi
 done
+bibfiles=`find bib -name '*.bib' -print`
+for i in $bibfiles
+do
+	basename="${i%.bib}"
+#	echo $basename.bib
+	sh ./utilities/bibhyphen2endash.sh $basename.bib > $tmpf
+	if ! diff -q $basename.bib $tmpf >/dev/null
+	then
+		echo "$basename.bib modified"
+		cp -f $tmpf $basename.bib
+	fi
+done
 rm -f $tmpf
diff --git a/utilities/hyphen2endash.sh b/utilities/hyphen2endash.sh
index 39005a4..4736c31 100644
--- a/utilities/hyphen2endash.sh
+++ b/utilities/hyphen2endash.sh
@@ -18,6 +18,7 @@
 # and~nn-mm -> and~nn--mm
 # Figures~\ref{foo}-\ref{bar} -> Figures~\ref{foo}--\ref{bar}
 # \co{xxx}-\{yyy} -> \co{xxx}--\co{yyy}
+# yyyy-\commityear -> yyyy--\commityear (in Legal statement)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +34,7 @@
 # along with this program; if not, you can access it online at
 # http://www.gnu.org/licenses/gpl-2.0.html.
 #
-# Copyright (C) Akira Yokosawa, 2016
+# Copyright (C) Akira Yokosawa, 2016, 2017
 #
 # Authors: Akira Yokosawa <akiyks@gmail.com>

@@ -44,6 +45,7 @@ cat $1 |
 	    -e 's/CPUs[ ~]\([0-9]\+\)-\([0-9]\+\)/CPUs~\1--\2/g' \
 	    -e 's/and[ ~]\([0-9]\+\)-\([0-9]\+\)/and~\1--\2/g' \
 	    -e 's/\(\\co{[^}]*}\)-\(\\co{[^}]*}\)/\1--\2/g' \
+	    -e 's/\([0-9]\)-\(\\commityear\)/\1--\2/g' \
 	    -e 's/\/\* Lines~\([0-9]\+\)--\([0-9]\+\) \*\//\/\* Lines \1-\2 \*\//g'

 # Last pattern is to preserve "Lines n-m" in comments within code snippet
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize)
  2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
  2017-01-28 11:08 ` [PATCH 1/4] Update hyphen-to-endash scripts Akira Yokosawa
@ 2017-01-28 11:11 ` Akira Yokosawa
  2017-01-28 11:12 ` [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...) Akira Yokosawa
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-01-28 11:11 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From edeae13c28aa406ce984c63f91556b4c6595679b Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 1 Jan 2017 18:17:55 +0900
Subject: [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize)

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/advsync/memorybarriers.tex b/advsync/memorybarriers.tex
index 721d893..98f7787 100644
--- a/advsync/memorybarriers.tex
+++ b/advsync/memorybarriers.tex
@@ -1760,7 +1760,7 @@ RCU system, for example,
 see \co{rcu_dereference()} in \path{include/linux/rcupdate.h}.
 This permits the current
 target of an RCU'd pointer to be replaced with a new modified target, without
-the replacement target appearing to be incompletely initialised.
+the replacement target appearing to be incompletely initialized.

 See also
 Section~\ref{sec:advsync:Cache Coherency}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...)
  2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
  2017-01-28 11:08 ` [PATCH 1/4] Update hyphen-to-endash scripts Akira Yokosawa
  2017-01-28 11:11 ` [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize) Akira Yokosawa
@ 2017-01-28 11:12 ` Akira Yokosawa
  2017-01-28 11:13 ` [PATCH 4/4] Use math mode minus signs for dashes in tables Akira Yokosawa
  2017-01-30 19:32 ` [PATCH 0/4] Misc updates and fixes Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-01-28 11:12 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 5a71dfe6dbac0d358aa2c004a2250279dbd9b1ed Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 6 Jan 2017 00:07:19 +0900
Subject: [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...)

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 together/applyrcu.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/together/applyrcu.tex b/together/applyrcu.tex
index 6334886..dd03c8c 100644
--- a/together/applyrcu.tex
+++ b/together/applyrcu.tex
@@ -332,7 +332,7 @@ lock.
 This section shows how RCU may be used to avoid this overhead.

 The code for performing an I/O is quite similar to the original, with
-a RCU read-side critical section being substituted for the reader-writer
+an RCU read-side critical section being substituted for the reader-writer
 lock read-side critical section in the original:

 \vspace{5pt}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] Use math mode minus signs for dashes in tables
  2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
                   ` (2 preceding siblings ...)
  2017-01-28 11:12 ` [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...) Akira Yokosawa
@ 2017-01-28 11:13 ` Akira Yokosawa
  2017-01-30 19:32 ` [PATCH 0/4] Misc updates and fixes Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-01-28 11:13 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 11f5734bf4b31fbb51cd6ec603d680a8b3f4f99c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 5 Jan 2017 20:50:58 +0900
Subject: [PATCH 4/4] Use math mode minus signs for dashes in tables

By using math mode minus, \makebox{} surrounding ``-'' can be
removed.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/whymb/whymemorybarriers.tex | 20 ++++++++++----------
 together/refcnt.tex                  |  8 ++++----
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/appendix/whymb/whymemorybarriers.tex b/appendix/whymb/whymemorybarriers.tex
index 70e1d30..007d673 100644
--- a/appendix/whymb/whymemorybarriers.tex
+++ b/appendix/whymb/whymemorybarriers.tex
@@ -570,24 +570,24 @@ Finally, CPU~1 reads the cache line at address~8, which uses a
 	\cline{4-7}
 	Sequence \# & CPU \# & Operation & 0 & 1 & 2 & 3 & 0 & 8 \\
 	\hline
-%	Seq CPU Operation	--------- CPU --------    - Memory -
-%				   0     1     2     3	    0   8
+%	Seq CPU Operation	------------- CPU -------------   - Memory -
+%				   0	   1	   2	   3	    0   8
 	\hline
-	0 &   & Initial State	& -/I & -/I & -/I & -/I   & V & V \\
+	0 &   & Initial State	& $-$/I & $-$/I & $-$/I & $-$/I   & V & V \\
 	\hline
-	1 & 0 & Load		& 0/S & -/I & -/I & -/I   & V & V \\
+	1 & 0 & Load		& 0/S &   $-$/I & $-$/I & $-$/I   & V & V \\
 	\hline
-	2 & 3 & Load		& 0/S & -/I & -/I & 0/S   & V & V \\
+	2 & 3 & Load		& 0/S &   $-$/I & $-$/I & 0/S     & V & V \\
 	\hline
-	3 & 0 & Invalidation	& 8/S & -/I & -/I & 0/S   & V & V \\
+	3 & 0 & Invalidation	& 8/S &   $-$/I & $-$/I & 0/S     & V & V \\
 	\hline
-	4 & 2 & RMW		& 8/S & -/I & 0/E & -/I   & V & V \\
+	4 & 2 & RMW		& 8/S &   $-$/I & 0/E &   $-$/I   & V & V \\
 	\hline
-	5 & 2 & Store		& 8/S & -/I & 0/M & -/I   & I & V \\
+	5 & 2 & Store		& 8/S &   $-$/I & 0/M &   $-$/I   & I & V \\
 	\hline
-	6 & 1 & Atomic Inc	& 8/S & 0/M & -/I & -/I   & I & V \\
+	6 & 1 & Atomic Inc	& 8/S &   0/M &   $-$/I & $-$/I   & I & V \\
 	\hline
-	7 & 1 & Writeback	& 8/S & 8/S & -/I & -/I   & V & V \\
+	7 & 1 & Writeback	& 8/S &   8/S &   $-$/I & $-$/I   & V & V \\
 \end{tabular}
 \caption{Cache Coherence Example}
 \label{tab:app:whymb:Cache Coherence Example}
diff --git a/together/refcnt.tex b/together/refcnt.tex
index cf23ba7..267cd9f 100644
--- a/together/refcnt.tex
+++ b/together/refcnt.tex
@@ -74,7 +74,7 @@ locking, and RCU.
 	Synchronization & Locking & Counting  & RCU \\
 	\hline
 	\hline
-	Locking		& -	  & CAM	      & CA  \\
+	Locking		& $-$	  & CAM	      & CA  \\
 	\hline
 	Reference	& A	  & AM	      & A   \\
 	Counting	&  	  &   	      &     \\
@@ -94,7 +94,7 @@ This table
 divides reference-counting mechanisms into the following broad categories:
 \begin{enumerate}
 \item	Simple counting with neither atomic operations, memory
-	barriers, nor alignment constraints \makebox{(``-'')}.
+	barriers, nor alignment constraints (``$-$'').
 \item	Atomic counting without memory barriers (``A'').
 \item	Atomic counting, with memory barriers required only on release
 	(``AM'').
@@ -116,7 +116,7 @@ contain memory barriers, and all checked acquisition operations also
 contain memory barriers.
 Therefore, cases ``CA'' and ``MCA'' are equivalent to ``CAM'', so that
 there are sections below for only the first four cases:
-\makebox{``-''}, ``A'', ``AM'', and ``CAM''.
+``$-$'', ``A'', ``AM'', and ``CAM''.
 The Linux primitives that support reference counting are presented in
 Section~\ref{sec:together:Linux Primitives Supporting Reference Counting}.
 Later sections cite optimizations that can improve performance
@@ -126,7 +126,7 @@ reference count need be checked for zero only very rarely.
 \subsection{Implementation of Reference-Counting Categories}
 \label{sec:together:Implementation of Reference-Counting Categories}

-Simple counting protected by locking (\makebox{``-''}) is described in
+Simple counting protected by locking (``$-$'') is described in
 Section~\ref{sec:together:Simple Counting},
 atomic counting with no memory barriers (``A'') is described in
 Section~\ref{sec:together:Atomic Counting},
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] Misc updates and fixes
  2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
                   ` (3 preceding siblings ...)
  2017-01-28 11:13 ` [PATCH 4/4] Use math mode minus signs for dashes in tables Akira Yokosawa
@ 2017-01-30 19:32 ` Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2017-01-30 19:32 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Sat, Jan 28, 2017 at 08:06:36PM +0900, Akira Yokosawa wrote:
> >From 11f5734bf4b31fbb51cd6ec603d680a8b3f4f99c Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sat, 28 Jan 2017 20:01:42 +0900
> Subject: [PATCH 0/4] Misc updates and fixes
> 
> Hi Paul,
> 
> This is a collection of random updates and fixes.
> 
> Patch 4 replaces non-hyphenation dashes with math mode minus signs.
> As you know, I dislike such uses of dashes in LaTeX source. ;-)

Applied, thank you!

But I am beginning to think in terms of just not using hyphens to
indicate inapplicable or missing information.  ;-)

							Thanx, Paul

>                                     Thanks, Akira
> --
> Akira Yokosawa (4):
>   Update hyphen-to-endash scripts
>   advsync/memorybarriers: Use American spelling (initialize)
>   together: Typo fix (a RCU ... -> an RCU ...)
>   Use math mode minus signs for dashes in tables
> 
>  advsync/memorybarriers.tex           |  2 +-
>  appendix/whymb/whymemorybarriers.tex | 20 ++++++++++----------
>  together/applyrcu.tex                |  2 +-
>  together/refcnt.tex                  |  8 ++++----
>  utilities/bibhyphen2endash.sh        | 27 +++++++++++++++++++++++++++
>  utilities/dohyphen2endash.sh         | 12 ++++++++++++
>  utilities/hyphen2endash.sh           |  4 +++-
>  7 files changed, 58 insertions(+), 17 deletions(-)
>  create mode 100644 utilities/bibhyphen2endash.sh
> 
> -- 
> 2.7.4
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-30 19:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28 11:06 [PATCH 0/4] Misc updates and fixes Akira Yokosawa
2017-01-28 11:08 ` [PATCH 1/4] Update hyphen-to-endash scripts Akira Yokosawa
2017-01-28 11:11 ` [PATCH 2/4] advsync/memorybarriers: Use American spelling (initialize) Akira Yokosawa
2017-01-28 11:12 ` [PATCH 3/4] together: Typo fix (a RCU ... -> an RCU ...) Akira Yokosawa
2017-01-28 11:13 ` [PATCH 4/4] Use math mode minus signs for dashes in tables Akira Yokosawa
2017-01-30 19:32 ` [PATCH 0/4] Misc updates and fixes Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.