Browse Source

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>
SeongJae Park 10 năm trước cách đây
mục cha
commit
65f95ff2e4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Documentation/memory-barriers.txt

+ 2 - 2
Documentation/memory-barriers.txt

@@ -1550,7 +1550,7 @@ of optimizations:
      the following:
      the following:
 
 
 	a = 0;
 	a = 0;
-	/* Code that does not store to variable a. */
+	... Code that does not store to variable a ...
 	a = 0;
 	a = 0;
 
 
      The compiler sees that the value of variable 'a' is already zero, so
      The compiler sees that the value of variable 'a' is already zero, so
@@ -1562,7 +1562,7 @@ of optimizations:
      wrong guess:
      wrong guess:
 
 
 	WRITE_ONCE(a, 0);
 	WRITE_ONCE(a, 0);
-	/* Code that does not store to variable a. */
+	... Code that does not store to variable a ...
 	WRITE_ONCE(a, 0);
 	WRITE_ONCE(a, 0);
 
 
  (*) The compiler is within its rights to reorder memory accesses unless
  (*) The compiler is within its rights to reorder memory accesses unless