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.
changeValue locks the mutex, changes sum, and then unlocks mutex.
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().
Will sum still be equal to 10 after my call to changeValue()?