projects
/
linux-2.6-microblaze.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
[linux-2.6-microblaze.git]
/
tools
/
memory-model
/
litmus-tests
/
MP+poonceonces.litmus
1
C MP+poonceonces
2
3
(*
4
* Result: Sometimes
5
*
6
* Can the counter-intuitive message-passing outcome be prevented with
7
* no ordering at all?
8
*)
9
10
{}
11
12
P0(int *x, int *y)
13
{
14
WRITE_ONCE(*x, 1);
15
WRITE_ONCE(*y, 1);
16
}
17
18
P1(int *x, int *y)
19
{
20
int r0;
21
int r1;
22
23
r0 = READ_ONCE(*y);
24
r1 = READ_ONCE(*x);
25
}
26
27
exists (1:r0=1 /\ 1:r1=0)