File Index
Files and directories
Sign in
FILE

LB+poacquireonce+pooncerelease.litmus

File preview with syntax highlighting.

linux-6.19.14/tools/memory-model/litmus-tests/LB+poacquireonce+pooncerelease.litmus PLAIN TEXT
 1C LB+poacquireonce+pooncerelease
 2
 3(*
 4 * Result: Never
 5 *
 6 * Does a release-acquire pair suffice for the load-buffering litmus
 7 * test, where each process reads from one of two variables then writes
 8 * to the other?
 9 *)
10
11{}
12
13P0(int *x, int *y)
14{
15	int r0;
16
17	r0 = READ_ONCE(*x);
18	smp_store_release(y, 1);
19}
20
21P1(int *x, int *y)
22{
23	int r0;
24
25	r0 = smp_load_acquire(y);
26	WRITE_ONCE(*x, 1);
27}
28
29exists (0:r0=1 /\ 1:r0=1)
~/ Read-only file preview.