I\'ve been reading from many sources that the volatile keyword is not helpful in multithreaded scenarios. However, this assertion is constantly challenged by atomic operatio
Well, the keyword 'volatile' makes sure the compiler always loads/stores the value of a variable from/to memory everytime the variable shows up in your code.
This prevents certain optimizations e.g. that the value is simply loaded into a register once and then used multiple times.
It is useful when you have multiple threads that can modify 'shared' variables between the threads. You will have to make sure to always load/store the value from/to memory in order to check for its value that can have been modified by another thread. If volatile was not used the other thread might not have written the new value to memory (but put it into a register or some other sort of optimization might have taken place) and the first thread would not notice any change of value.
In your cases 'volatile SInt32 *address' tells the compiler that the memory pointed to by address is a subject to change by any source. Hence the need for an atomic operation.