diff options
Diffstat (limited to 'runtime/base/locks.cc')
-rw-r--r-- | runtime/base/locks.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/base/locks.cc b/runtime/base/locks.cc index 2c6b96892b..2c10bfd700 100644 --- a/runtime/base/locks.cc +++ b/runtime/base/locks.cc @@ -93,7 +93,7 @@ static void BackOff(uint32_t i) { volatile uint32_t x = 0; const uint32_t spin_count = 10 * i; for (uint32_t spin = 0; spin < spin_count; ++spin) { - ++x; // Volatile; hence should not be optimized away. + x = x + 1; // Volatile; hence should not be optimized away. } // TODO: Consider adding x86 PAUSE and/or ARM YIELD here. } else if (i <= kYieldMax) { |