Skip to contentSkip to conversation

locking: Consistently append parentheses to pthread_cond_wait()

PATCH In review SeongJae Park 2 participants 2 messages May 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 locking: Consistently append parentheses to pthread_cond_wait()

Some of 'pthread_cond_wait()' mentions have '()' suffix, which indicates it's a function, but some mentions don't. This commit adds the suffix to all mentions to be consistent.

---
 locking/locking.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
locking/locking.tex +2 -2
index 14690b19..4ad5e4c4 100644
@@ -528,8 +528,8 @@ prevents hangs due to lost wakeups.
 
 	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
+	to \co{pthread_cond_wait()}.
+	Now, \co{pthread_cond_wait()} will release \co{mutex_a}, but
 	will re-acquire it before returning.
 	If some other thread acquires \co{mutex_a} in the meantime
 	and then blocks on \co{mutex_b}, the program will deadlock.
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · SeongJae Park

Some of 'pthread_cond_wait()' mentions have '()' suffix, which indicates it's a function, but some mentions don't. This commit adds the suffix to all mentions to be consistent.

Good eyes! Queued and pushed, thank you!

Thanx, Paul

Quoted 22 lines
---
 locking/locking.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
locking/locking.tex +2 -2
index 14690b19..4ad5e4c4 100644
@@ -528,8 +528,8 @@ prevents hangs due to lost wakeups.
 
 	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
+	to \co{pthread_cond_wait()}.
+	Now, \co{pthread_cond_wait()} will release \co{mutex_a}, but
 	will re-acquire it before returning.
 	If some other thread acquires \co{mutex_a} in the meantime
 	and then blocks on \co{mutex_b}, the program will deadlock.
Signature · 1 line
2.17.1