the question is about when does a 64bit load/store operations are considered to be atomic.
- if i have a 64bit processor, but i’m using 32bit OS. Will i have 64bit atomicity?
- if i’m using 64bit OS but running an 32bit application (using WoW64), will i have 64bit atomicity?
The application must be running on a 64bit OS and in native 64bit mode to gain the advantages of x64, unsurprisingly. If you’re running in 32bit mode, either on a 32bit OS (with a 32bit app), you will get 32bit atomicity. If you’re running 64bit mode on a 64bit OS on a 64bit CPU, you will get 64bit atomicity. All of the components in the chain (app, OS, CPU) must be running 64bit to get 64bit.