repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git]
/
tools
/
memory-model
/
litmus-tests
/
CoWR+poonceonce+Once.litmus
blob
bb068c92d8da27fad692b9d168875bc9c5de815c
1
C CoWR+poonceonce+Once
2
3
(*
4
* Result: Never
5
*
6
* Test of write-read coherence, that is, whether or not a write to a
7
* given variable and a later read from that same variable are ordered.
8
*)
9
10
{}
11
12
P0(int *x)
13
{
14
int r0;
15
16
WRITE_ONCE(*x, 1);
17
r0 = READ_ONCE(*x);
18
}
19
20
P1(int *x)
21
{
22
WRITE_ONCE(*x, 2);
23
}
24
25
exists (x=1 /\ 0:r0=2)