source: mainline/kernel/generic/include/compiler/barrier.h@ 0cf813d

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 0cf813d was 0cf813d, checked in by Adam Hraska <adam.hraska+hos@…>, 13 years ago

rcu: Added new statistics. Changed reclaimers to run callbacks with preemption disabled if too many callbacks are pending in order to avoid exhausting system memory.

  • Property mode set to 100644
File size: 303 bytes
Line 
1
2#ifndef KERN_COMPILER_BARRIER_H_
3#define KERN_COMPILER_BARRIER_H_
4
5#define compiler_barrier() asm volatile ("" ::: "memory")
6
7/** Forces the compiler to access (ie load/store) the variable only once. */
8#define ACCESS_ONCE(var) (*((volatile typeof(var)*)&(var)))
9
10#endif /* KERN_COMPILER_BARRIER_H_ */
Note: See TracBrowser for help on using the repository browser.