Memory mapped registers in C/C++: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m typo--, some specification |
m Bot: Replace deprecated source tag with syntaxhighlight |
||
(One intermediate revision by one other user not shown) | |||
Line 19:
Explicit memory barrier directives to the compiler are compiler specific. Volatile may work as a memory barrier, but it in many cases is an overoptimization. Where possible, avoid the use of volatile as a memory barrier, and prefer to use an explicit memory barrier directive to the compiler.
<
// Explicit memory barrier for use with GCC.
asm volatile ("": : :"memory");</
===CPU memory barriers===
Line 52:
==Useful References==
|