That's not what volatile says. There is nothing in the entire C execution model that even considers multiple threads. That's why we have other standards like MPI and OpenMP.
If you need to protect data like this you must make use of constructs outside the C standard.