Visual Studio 2005 gives you acquire and release semantics for free on volatile memory access
If you are using Visual Studio 2005 or later, then you don't need the weird function because Visual Studio 2005 and later automatically impose acquire semantics on reads from volatile locations. It also imposes release semantics on writes to volatile locations. In other words, you can replace the old function with the following: This is a g...