title: Where is InterlockedRead?
body: <p>Win32 api has a set of InterlockedXXX functions to atomically and synchronously manipulate simple variables, however there doesn't seem to be any InterlockedRead function, to simply retrive the value of the variable. How come?</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684122(v=vs.85).aspx" rel="nofollow noreferrer">MSDN says</a> that:</p>
  
  <blockquote>
    <p>Simple reads and writes to properly-aligned 32-bit variables are atomic operations</p>
  </blockquote>
  
  <p>but adds:</p>
  
  <blockquote>
    <p>However, access is not guaranteed to be synchronized. If two threads are reading and writing from the same variable, you cannot determine if one thread will perform its read operation before the other performs its write operation.</p>
  </blockquote>
  
  <p>Which means, as I understand it, that a simple read operation of a variable can take place while another, say, InterlockedAdd operation is in place. So why isn't there an interlocked function to read a variable?</p>
  
  <p>I guess the value can be read as the result InterlockedAdd-ing zero, but that doesn't seem the right way to go.</p>