title: Mutex lock in function that modifies global variables
body: <p>Inside a function, I am calling another function(changeValue) that has a mutex lock on the global variables it modifies. changeValue is also periodically called by other functions.</p>
  
  <p>changeValue locks the mutex, changes sum, and then unlocks mutex.</p>
  
  <p>changeValue is of void type, so it simply modifies the global variable sum(e.g. sum = 10).
  After my call to changeValue(), I want to do some calculations using the global variables modified by changeValue(). </p>
  
  <p>Will sum still be equal to 10 after my call to changeValue()?</p>