diff options
author | SeongJae Park <sj38.park@gmail.com> | 2016-02-22 11:28:29 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-03-14 18:52:19 -0400 |
commit | 65f95ff2e41a32dd190cf28e3abb029625eef968 (patch) | |
tree | bf74a8b2d012d7b87b21b0e2720b773e6661d2cb /Documentation/memory-barriers.txt | |
parent | f36fe1e70b5477d4e42df8ea97278e9698dddbbf (diff) |
documentation: Clarify compiler store-fusion example
The compiler store-fusion example in memory-barriers.txt uses a C
comment to represent arbitrary code that does not update a given
variable. Unfortunately, someone could reasonably interpret the
comment as instead referring to the following line of code. This
commit therefore replaces the comment with a string that more
clearly represents the arbitrary code.
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/memory-barriers.txt')
-rw-r--r-- | Documentation/memory-barriers.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 8367d393cba2..3729cbe60e41 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -1550,7 +1550,7 @@ of optimizations: | |||
1550 | the following: | 1550 | the following: |
1551 | 1551 | ||
1552 | a = 0; | 1552 | a = 0; |
1553 | /* Code that does not store to variable a. */ | 1553 | ... Code that does not store to variable a ... |
1554 | a = 0; | 1554 | a = 0; |
1555 | 1555 | ||
1556 | The compiler sees that the value of variable 'a' is already zero, so | 1556 | The compiler sees that the value of variable 'a' is already zero, so |
@@ -1562,7 +1562,7 @@ of optimizations: | |||
1562 | wrong guess: | 1562 | wrong guess: |
1563 | 1563 | ||
1564 | WRITE_ONCE(a, 0); | 1564 | WRITE_ONCE(a, 0); |
1565 | /* Code that does not store to variable a. */ | 1565 | ... Code that does not store to variable a ... |
1566 | WRITE_ONCE(a, 0); | 1566 | WRITE_ONCE(a, 0); |
1567 | 1567 | ||
1568 | (*) The compiler is within its rights to reorder memory accesses unless | 1568 | (*) The compiler is within its rights to reorder memory accesses unless |