All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names
@ 2021-10-18  8:44 SeongJae Park
  2021-10-18  8:44 ` [PATCH 2/5] toolsoftrade: Add arguments in 'WRITE_ONCE()' example SeongJae Park
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: SeongJae Park @ 2021-10-18  8:44 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, SeongJae Park

Parentheses are appended to all function names including 'mythread()',
but one case is not.  This commit adds parentheses there.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 toolsoftrade/toolsoftrade.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index c9f5b399..b2694da2 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -344,7 +344,7 @@ ID of the thread to be created, the second \co{NULL} argument is a pointer
 to an optional \co{pthread_attr_t}, the third argument is the function
 (in this case, \co{mythread()})
 that is to be invoked by the new thread, and the last \co{NULL} argument
-is the argument that will be passed to \co{mythread}.
+is the argument that will be passed to \co{mythread()}.
 \end{fcvref}
 
 \begin{listing}
-- 
2.17.1


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

* [PATCH 2/5] toolsoftrade: Add arguments in 'WRITE_ONCE()' example
  2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
@ 2021-10-18  8:44 ` SeongJae Park
  2021-10-18  8:44 ` [PATCH 3/5] toolsoftrade: Consistently wrap 'volatile' with '\co{}' SeongJae Park
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2021-10-18  8:44 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, SeongJae Park

A sentence explaining common things between 'READ_ONCE()' and
'__atomic_load_n()' provides arguments, but the explanation for
'WRITE_ONCE()' doesn't.  This commit makes it also consistently provides
the arguments.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 toolsoftrade/toolsoftrade.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index b2694da2..bc332aba 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -544,7 +544,7 @@ primitives.
 	\cref{chp:Advanced Synchronization: Memory Ordering}.
 	In the meantime, \co{READ_ONCE(x)} has much in common with
 	the \GCC\  intrinsic \co{__atomic_load_n(&x, __ATOMIC_RELAXED)}
-	and \co{WRITE_ONCE()} has much in common with the \GCC\ 
+	and \co{WRITE_ONCE(x, v)} has much in common with the \GCC\
 	intrinsic \co{__atomic_store_n(&x, v, __ATOMIC_RELAXED)}.
 }\QuickQuizEndE
 }
-- 
2.17.1


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

* [PATCH 3/5] toolsoftrade: Consistently wrap 'volatile' with '\co{}'
  2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
  2021-10-18  8:44 ` [PATCH 2/5] toolsoftrade: Add arguments in 'WRITE_ONCE()' example SeongJae Park
@ 2021-10-18  8:44 ` SeongJae Park
  2021-10-18  8:44 ` [PATCH 4/5] toolsoftrade: Fix a typo SeongJae Park
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2021-10-18  8:44 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, SeongJae Park

A sentence is wrapping 'volatile' with '\co{}' for most cases but one
case.  This commit makes it consistently wrap the keyword with the
macro.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 toolsoftrade/toolsoftrade.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index bc332aba..f0fb360c 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -803,7 +803,7 @@ rights to assume that the value of \co{goflag} would never change.
 	most of the accesses are protected by a lock (and thus \emph{not}
 	subject to change), but where a few of the accesses are made outside
 	of the lock.
-	Using a volatile declaration in this case would make it harder
+	Using a \co{volatile} declaration in this case would make it harder
 	for the reader to note the special accesses outside of the lock,
 	and would also make it harder for the compiler to generate good
 	code under the lock.
-- 
2.17.1


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

* [PATCH 4/5] toolsoftrade: Fix a typo
  2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
  2021-10-18  8:44 ` [PATCH 2/5] toolsoftrade: Add arguments in 'WRITE_ONCE()' example SeongJae Park
  2021-10-18  8:44 ` [PATCH 3/5] toolsoftrade: Consistently wrap 'volatile' with '\co{}' SeongJae Park
@ 2021-10-18  8:44 ` SeongJae Park
  2021-10-18  8:44 ` [PATCH 5/5] toolsoftrade: Use '\co{}' instead of '{\tt}' SeongJae Park
  2021-10-18 16:04 ` [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2021-10-18  8:44 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, SeongJae Park

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 toolsoftrade/toolsoftrade.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index f0fb360c..7cbe2f0b 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -851,7 +851,7 @@ rights to assume that the value of \co{goflag} would never change.
 	This leads to the question of how one thread can gain access to
 	another thread's \apig{__thread} variable, and the answer is that
 	the second thread must store a pointer to its \apig{__thread}
-	pointer somewhere that the first thread has access to.
+	variable somewhere that the first thread has access to.
 	One common approach is to maintain a linked list with one
 	element per thread, and to store the address of each thread's
 	\apig{__thread} variable in the corresponding element.
-- 
2.17.1


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

* [PATCH 5/5] toolsoftrade: Use '\co{}' instead of '{\tt}'
  2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
                   ` (2 preceding siblings ...)
  2021-10-18  8:44 ` [PATCH 4/5] toolsoftrade: Fix a typo SeongJae Park
@ 2021-10-18  8:44 ` SeongJae Park
  2021-10-18 16:04 ` [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2021-10-18  8:44 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, SeongJae Park

There is a sentence using '{\tt}' instead of '\co{}'.  This commit
updates those.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
 toolsoftrade/toolsoftrade.tex | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
index 7cbe2f0b..8badbcaf 100644
--- a/toolsoftrade/toolsoftrade.tex
+++ b/toolsoftrade/toolsoftrade.tex
@@ -1448,10 +1448,10 @@ spin_unlock(&mutex);
 \end{VerbatimU}
 
 \QuickQuiz{
-	What problems could occur if the variable {\tt counter} were
-	incremented without the protection of {\tt mutex}?
+	What problems could occur if the variable \co{counter} were
+	incremented without the protection of \co{mutex}?
 }\QuickQuizAnswer{
-	On CPUs with load-store architectures, incrementing {\tt counter}
+	On CPUs with load-store architectures, incrementing \co{counter}
 	might compile into something like the following:
 
 \begin{VerbatimU}
@@ -1461,9 +1461,9 @@ STORE r0,counter
 \end{VerbatimU}
 
 	On such machines, two threads might simultaneously load the
-	value of {\tt counter}, each increment it, and each store the
+	value of \co{counter}, each increment it, and each store the
 	result.
-	The new value of {\tt counter} will then only be one greater
+	The new value of \co{counter} will then only be one greater
 	than before, despite two threads each incrementing it.
 }\QuickQuizEnd
 
-- 
2.17.1


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

* Re: [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names
  2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
                   ` (3 preceding siblings ...)
  2021-10-18  8:44 ` [PATCH 5/5] toolsoftrade: Use '\co{}' instead of '{\tt}' SeongJae Park
@ 2021-10-18 16:04 ` Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-10-18 16:04 UTC (permalink / raw)
  To: SeongJae Park; +Cc: perfbook

On Mon, Oct 18, 2021 at 10:44:35AM +0200, SeongJae Park wrote:
> Parentheses are appended to all function names including 'mythread()',
> but one case is not.  This commit adds parentheses there.
> 
> Signed-off-by: SeongJae Park <sj38.park@gmail.com>

Queued and pushed the series, thank you!

							Thanx, Paul

> ---
>  toolsoftrade/toolsoftrade.tex | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/toolsoftrade/toolsoftrade.tex b/toolsoftrade/toolsoftrade.tex
> index c9f5b399..b2694da2 100644
> --- a/toolsoftrade/toolsoftrade.tex
> +++ b/toolsoftrade/toolsoftrade.tex
> @@ -344,7 +344,7 @@ ID of the thread to be created, the second \co{NULL} argument is a pointer
>  to an optional \co{pthread_attr_t}, the third argument is the function
>  (in this case, \co{mythread()})
>  that is to be invoked by the new thread, and the last \co{NULL} argument
> -is the argument that will be passed to \co{mythread}.
> +is the argument that will be passed to \co{mythread()}.
>  \end{fcvref}
>  
>  \begin{listing}
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2021-10-18 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  8:44 [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names SeongJae Park
2021-10-18  8:44 ` [PATCH 2/5] toolsoftrade: Add arguments in 'WRITE_ONCE()' example SeongJae Park
2021-10-18  8:44 ` [PATCH 3/5] toolsoftrade: Consistently wrap 'volatile' with '\co{}' SeongJae Park
2021-10-18  8:44 ` [PATCH 4/5] toolsoftrade: Fix a typo SeongJae Park
2021-10-18  8:44 ` [PATCH 5/5] toolsoftrade: Use '\co{}' instead of '{\tt}' SeongJae Park
2021-10-18 16:04 ` [PATCH 1/5] toolsoftrade: Consistently add parentheses to function names 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.