From d7cee0f863d91bc8c5c7b562dc6aa5c6c0d2851b Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Wed, 5 Feb 2020 23:51:59 +0300 Subject: [PATCH] Fix MIPS builds. --- runtime/src/main/cpp/CyclicCollector.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +}