Fix locking issue with monotonic_get
Fix monotonic_get spinning forever due to lack of 'volatile' qualifier