- 论坛徽章:
- 11
|
已经半明白了, 妈的就在定义的头顶上就有注释:
303/*
304 * Prevent the compiler from merging or refetching accesses. The compiler
305 * is also forbidden from reordering successive instances of ACCESS_ONCE(),
306 * but only when the compiler is aware of some particular ordering. One way
307 * to make the compiler aware of ordering is to put the two invocations of
308 * ACCESS_ONCE() in different C statements.
309 *
310 * This macro does absolutely -nothing- to prevent the CPU from reordering,
311 * merging, or refetching absolutely anything at any time. Its main intended
312 * use is to mediate communication between process-level code and irq/NMI
313 * handlers, all running on the same CPU.
314 */ |
|