Skip to main content

2 docs tagged with "volatile"

View all tags

const and volatile Qualifiers

CV-qualifiers (const and volatile) modify type behavior. const prevents modification; volatile prevents compiler optimization.

volatile Keyword

volatile tells compiler that a variable can change unexpectedly (hardware, interrupts, other threads). Prevents certain optimizations. Not for thread synchronization - use atomics instead.