projects
/
librecmc
/
linux-libre.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git]
/
tools
/
memory-model
/
litmus-tests
/
CoWR+poonceonce+Once.litmus
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)