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
Linux 5.7.7
[linux/fpc-iii.git]
/
tools
/
memory-model
/
litmus-tests
/
CoRW+poonceonce+Once.litmus
blob
4635739f3974dd76925b2a20f874f03a2e55ce5f
1
C CoRW+poonceonce+Once
2
3
(*
4
* Result: Never
5
*
6
* Test of read-write coherence, that is, whether or not a read from
7
* a given variable and a later write to that same variable are ordered.
8
*)
9
10
{}
11
12
P0(int *x)
13
{
14
int r0;
15
16
r0 = READ_ONCE(*x);
17
WRITE_ONCE(*x, 1);
18
}
19
20
P1(int *x)
21
{
22
WRITE_ONCE(*x, 2);
23
}
24
25
exists (x=2 /\ 0:r0=2)