Add volatile to modify LockValue in ReleaseSpinLock().