Lines Matching refs:WRITE_ONCE

197 	WRITE_ONCE(Q, P); smp_read_barrier_depends(); D = READ_ONCE(*Q);
205 and WRITE_ONCE() are required to prevent compiler mischief. Please
212 a = READ_ONCE(*X); WRITE_ONCE(*X, b);
220 WRITE_ONCE(*X, c); d = READ_ONCE(*X);
233 WRITE_ONCE(). Without them, the compiler is within its rights to
523 WRITE_ONCE(P, &B)
550 WRITE_ONCE(P, &B);
577 WRITE_ONCE(P, 1);
622 WRITE_ONCE(b, p);
647 WRITE_ONCE(b, p);
651 WRITE_ONCE(b, p);
660 WRITE_ONCE(b, p); /* BUG: No ordering vs. load from a!!! */
662 /* WRITE_ONCE(b, p); -- moved up, BUG!!! */
665 /* WRITE_ONCE(b, p); -- moved up, BUG!!! */
690 WRITE_ONCE(b, p);
693 WRITE_ONCE(b, r);
706 WRITE_ONCE(b, p);
709 WRITE_ONCE(b, r);
718 WRITE_ONCE(b, p);
731 WRITE_ONCE(b, p);
734 WRITE_ONCE(b, r);
747 WRITE_ONCE(b, 1);
754 WRITE_ONCE(b, 1);
769 WRITE_ONCE(y, 1); WRITE_ONCE(x, 1);
779 WRITE_ONCE(x, 2);
811 away the ordering. Careful use of READ_ONCE() and WRITE_ONCE()
842 WRITE_ONCE(a, 1);
844 WRITE_ONCE(b, 2); x = READ_ONCE(b);
854 WRITE_ONCE(b, &a); x = READ_ONCE(b);
864 WRITE_ONCE(y, 1); if (r2 = READ_ONCE(x)) {
866 WRITE_ONCE(y, 1);
880 WRITE_ONCE(a, 1); }---- --->{ v = READ_ONCE(c);
881 WRITE_ONCE(b, 2); } \ / { w = READ_ONCE(d);
883 WRITE_ONCE(c, 3); } / \ { x = READ_ONCE(a);
884 WRITE_ONCE(d, 4); }---- --->{ y = READ_ONCE(b);
1335 variants of barrier(). However, READ_ONCE() and WRITE_ONCE() can be
1337 accesses flagged by the READ_ONCE() or WRITE_ONCE().
1349 The READ_ONCE() and WRITE_ONCE() functions can prevent any number of
1368 In short, READ_ONCE() and WRITE_ONCE() provide cache coherence for
1470 Use WRITE_ONCE() to prevent the compiler from making this sort of
1473 WRITE_ONCE(a, 0);
1475 WRITE_ONCE(a, 0);
1504 interrupt_handler() might be passed a garbled msg. Use WRITE_ONCE()
1509 WRITE_ONCE(msg, get_message());
1510 WRITE_ONCE(flag, true);
1519 Note that the READ_ONCE() and WRITE_ONCE() wrappers in
1523 and WRITE_ONCE() are not needed in interrupt_handler() other than
1530 WRITE_ONCE() past code not containing READ_ONCE(), WRITE_ONCE(),
1534 and WRITE_ONCE() are more selective: With READ_ONCE() and
1535 WRITE_ONCE(), the compiler need only forget the contents of the
1539 respect the order in which the READ_ONCE()s and WRITE_ONCE()s occur,
1560 Use WRITE_ONCE() to prevent this as follows:
1563 WRITE_ONCE(b, a);
1565 WRITE_ONCE(b, 42);
1588 use of WRITE_ONCE() prevents store tearing in the following example:
1590 WRITE_ONCE(p, 0x00010002);
1607 Because there are no READ_ONCE() or WRITE_ONCE() wrappers and no
1612 and WRITE_ONCE() again prevent tearing in this example:
1615 WRITE_ONCE(foo2.b, READ_ONCE(foo1.b));
1619 WRITE_ONCE() on a variable that has been marked volatile. For example,
1622 WRITE_ONCE() are implemented as volatile casts, which has no effect when
2108 WRITE_ONCE(*A, a); WRITE_ONCE(*E, e);
2110 WRITE_ONCE(*B, b); WRITE_ONCE(*F, f);
2111 WRITE_ONCE(*C, c); WRITE_ONCE(*G, g);
2113 WRITE_ONCE(*D, d); WRITE_ONCE(*H, h);
2830 WRITE_ONCE(*B, b);
2833 WRITE_ONCE(*E, e);
2881 WRITE_ONCE(*A, V);
2882 WRITE_ONCE(*A, W);
2884 WRITE_ONCE(*A, Y);
2902 of the world remains consistent. Note that READ_ONCE() and WRITE_ONCE()
2905 On such architectures, READ_ONCE() and WRITE_ONCE() do whatever is
2907 used by READ_ONCE() and WRITE_ONCE() cause GCC to emit the special ld.acq
2922 since, without either a write barrier or an WRITE_ONCE(), it can be
2928 may, without a memory barrier or an READ_ONCE() and WRITE_ONCE(), be