diff --git a/runtime/src/main/cpp/CyclicCollector.cpp b/runtime/src/main/cpp/CyclicCollector.cpp index e62d5a3a938..d2b27add5f2 100644 --- a/runtime/src/main/cpp/CyclicCollector.cpp +++ b/runtime/src/main/cpp/CyclicCollector.cpp @@ -355,7 +355,11 @@ class CyclicCollector { auto delta = tick - atomicGet(&lastTick_); if (delta > 10 || delta < 0) { auto currentTimestampUs = konan::getTimeMicros(); +#if KONAN_NO_64BIT_ATOMIC + if (currentTimestampUs - *(volatile int64_t*)&lastTimestampUs_ > 10000) { +#else if (currentTimestampUs - atomicGet(&lastTimestampUs_) > 10000) { +#endif // KONAN_NO_64BIT_ATOMIC // Do we care if this lock is not here? Locker locker(×tampLock_); lastTick_ = currentTick_; @@ -486,4 +490,4 @@ void cyclicLocalGC() { if (cyclicCollector) cyclicCollector->localGC(); #endif // WITH_WORKERS -} \ No newline at end of file +}