= Volatile-qualified objects in C
<Volatile-qualified objects in C> are objects whose accesses must follow the implementation's observable-access rules even when the optimizer cannot see an ordinary program dependency. They are commonly used for device registers and state changed by an <interrupt handler>, under the target compiler's embedded execution model. `volatile` does not by itself provide atomic multiword access, <mutual exclusion> or inter-thread synchronization. Protecting a shared snapshot still requires a suitable <critical section> or another synchronization protocol.<C11 committee draft N1570>[Sections 5.1.2.3 and 6.7.3, especially the implementation-defined meaning of volatile access]{ref}
Back to article page