Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.2.
 1C WRC+pooncerelease+rmbonceonce+Once
 2
 3(*
 4 * Result: Never
 5 *
 6 * This litmus test is an extension of the message-passing pattern, where
 7 * the first write is moved to a separate process.  Because it features
 8 * a release and a read memory barrier, it should be forbidden.
 9 *)
10
11{}
12
13P0(int *x)
14{
15	WRITE_ONCE(*x, 1);
16}
17
18P1(int *x, int *y)
19{
20	int r0;
21
22	r0 = READ_ONCE(*x);
23	smp_store_release(y, 1);
24}
25
26P2(int *x, int *y)
27{
28	int r0;
29	int r1;
30
31	r0 = READ_ONCE(*y);
32	smp_rmb();
33	r1 = READ_ONCE(*x);
34}
35
36exists (1:r0=1 /\ 2:r0=1 /\ 2:r1=0)