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.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git]
/
tools
/
memory-model
/
litmus-tests
/
CoRW+poonceonce+Once.litmus
blob
5faae98f7ffb3f9890e8f6674967ea6ef3ea53e1
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
int x;
12
}
13
14
P0(int *x)
15
{
16
int r0;
17
18
r0 = READ_ONCE(*x);
19
WRITE_ONCE(*x, 1);
20
}
21
22
P1(int *x)
23
{
24
WRITE_ONCE(*x, 2);
25
}
26
27
exists (x=2 /\ 0:r0=2)