a_struct.pmem_i; // the type is, wait for it, int* volatile (the pointer is volatile not the object it is pointing to) The second line is a very important point to keep in mind when declaring structs.
volatile warns the optimizer that a variable can change without notice, so we need to know why that would ever matter. And for that, we’ll take a quick glimpse into the logic of (one type of) compiler ...
Kernel code has to handle volatile data, but if you see the C keyword "volatile" in the kernel, it's a mistake. Here's why Kernel code has to handle volatile data, but if you see the C keyword ...