Skip to content

Commit 3321ea1

Browse files
AlanSternpaulmckrcu
authored andcommitted
tools/memory-model/Documentation: Fix typos in explanation.txt
This patch fixes a few minor typos and improves word usage in a few places in the Linux Kernel Memory Model's explanation.txt file. Signed-off-by: Alan Stern <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]> Acked-by: Andrea Parri <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent daebf24 commit 3321ea1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/memory-model/Documentation/explanation.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ goes like this:
206206
P0 stores 1 to buf before storing 1 to flag, since it executes
207207
its instructions in order.
208208

209-
Since an instruction (in this case, P1's store to flag) cannot
209+
Since an instruction (in this case, P0's store to flag) cannot
210210
execute before itself, the specified outcome is impossible.
211211

212212
However, real computer hardware almost never follows the Sequential
@@ -419,7 +419,7 @@ example:
419419

420420
The object code might call f(5) either before or after g(6); the
421421
memory model cannot assume there is a fixed program order relation
422-
between them. (In fact, if the functions are inlined then the
422+
between them. (In fact, if the function calls are inlined then the
423423
compiler might even interleave their object code.)
424424

425425

@@ -499,7 +499,7 @@ different CPUs (external reads-from, or rfe).
499499

500500
For our purposes, a memory location's initial value is treated as
501501
though it had been written there by an imaginary initial store that
502-
executes on a separate CPU before the program runs.
502+
executes on a separate CPU before the main program runs.
503503

504504
Usage of the rf relation implicitly assumes that loads will always
505505
read from a single store. It doesn't apply properly in the presence
@@ -955,7 +955,7 @@ atomic update. This is what the LKMM's "atomic" axiom says.
955955
THE PRESERVED PROGRAM ORDER RELATION: ppo
956956
-----------------------------------------
957957

958-
There are many situations where a CPU is obligated to execute two
958+
There are many situations where a CPU is obliged to execute two
959959
instructions in program order. We amalgamate them into the ppo (for
960960
"preserved program order") relation, which links the po-earlier
961961
instruction to the po-later instruction and is thus a sub-relation of
@@ -1572,7 +1572,7 @@ and there are events X, Y and a read-side critical section C such that:
15721572

15731573
2. X comes "before" Y in some sense (including rfe, co and fr);
15741574

1575-
2. Y is po-before Z;
1575+
3. Y is po-before Z;
15761576

15771577
4. Z is the rcu_read_unlock() event marking the end of C;
15781578

0 commit comments

Comments
 (0)