From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Scott Tsai <scottt@scottt.tw>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memory-barriers.txt: Fix typo in pairing example
Date: Tue, 19 Sep 2017 15:59:32 -0700 [thread overview]
Message-ID: <20170919225932.GN3521@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170919181600.4839-1-scottt@scottt.tw>
On Wed, Sep 20, 2017 at 02:16:00AM +0800, Scott Tsai wrote:
> In the "general barrier pairing with implicit control depdendency"
> example, the last write by CPU 1 was meant to change variable x and not
> y. The example would be pretty uninteresting if no CPU ever changes x
> and the variable was initialized to zero.
>
> Signed-off-by: Scott Tsai <scottt@scottt.tw>
Queued for review, thank you!!!
Thanx, Paul
> ---
> Documentation/memory-barriers.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
> index b759a60624fd..468894a705a9 100644
> --- a/Documentation/memory-barriers.txt
> +++ b/Documentation/memory-barriers.txt
> @@ -968,7 +968,7 @@ Or even:
> =============== ===============================
> r1 = READ_ONCE(y);
> <general barrier>
> - WRITE_ONCE(y, 1); if (r2 = READ_ONCE(x)) {
> + WRITE_ONCE(x, 1); if (r2 = READ_ONCE(x)) {
> <implicit control dependency>
> WRITE_ONCE(y, 1);
> }
> --
> 2.13.5
>
prev parent reply other threads:[~2017-09-19 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 18:16 [PATCH] memory-barriers.txt: Fix typo in pairing example Scott Tsai
2017-09-19 22:59 ` Paul E. McKenney [this message]
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=20170919225932.GN3521@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=scottt@scottt.tw \
/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 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.