Sunday 15 August 2010

c - Usage of Volatile in case of Memory mapped Devices? -


The following link says that "access to device registrars is always up to date"

< P> My question is do we ever need volatile, when should the memory mapped device registers be accessed?

illusion

In this regard, the memory / Strong> is configured as inefficient for hardware caching.

strong> In fast intermediate memory, which is used for the speed of operation compared to reaching the slow main memory banks. It is traditionally almost transparent for software (exceptions to modifying the code on the machine with different instructions and data cache.)

On the contrary, optimizing unstable "Software" of the compiler values ​​is caching the caching strategically in the register, delaying the calculation as needed, or if they do not have to calculate unnecessary, inform the original effect compiler that I Analysis of value or can be consumed by invisible mechanism for the analysis - it may be that the current hardware processor a separate thread or terms of hardware or performance beyond the core is.

>

No comments:

Post a Comment