From: SeongJae Park <sj38.park@gmail.com>
To: perfbook@vger.kernel.org, paulmck@kernel.org
Cc: SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH] locking: Consistently append parentheses to pthread_cond_wait()
Date: Mon, 30 May 2022 09:12:36 -0700 [thread overview]
Message-ID: <20220530161236.6397-1-sj38.park@gmail.com> (raw)
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.
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
locking/locking.tex | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/locking/locking.tex b/locking/locking.tex
index 14690b19..4ad5e4c4 100644
--- a/locking/locking.tex
+++ b/locking/locking.tex
@@ -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.
--
2.17.1
next reply other threads:[~2022-05-30 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 16:12 SeongJae Park [this message]
2022-05-30 17:47 ` [PATCH] locking: Consistently append parentheses to pthread_cond_wait() Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220530161236.6397-1-sj38.park@gmail.com \
--to=sj38.park@gmail.com \
--cc=paulmck@kernel.org \
--cc=perfbook@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).