From 7b8698b47a0ff5c4adaf474e47f89434f287f183 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 3 Jun 2016 16:40:15 +0300 Subject: [core] Naive atomic type for ARMv5 std::atomic is implemented lock free which doesn't work on ARMv5 and seems like the compiler is generating bogus code. This workaround is a naive implementation using regular mutexes. --- include/mbgl/util/run_loop.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/mbgl/util') diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp index 9703fe7bcb..56965c97e6 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -9,7 +10,6 @@ #include #include #include -#include namespace mbgl { namespace util { @@ -59,7 +59,7 @@ public: template std::unique_ptr invokeCancellable(Fn&& fn, Args&&... args) { - auto flag = std::make_shared>(); + auto flag = std::make_shared>(); *flag = false; auto tuple = std::make_tuple(std::move(args)...); @@ -77,7 +77,7 @@ public: template std::unique_ptr invokeWithCallback(Fn&& fn, Cb&& callback, Args&&... args) { - auto flag = std::make_shared>(); + auto flag = std::make_shared>(); *flag = false; // Create a lambda L1 that invokes another lambda L2 on the current RunLoop R, that calls @@ -114,7 +114,7 @@ private: template class Invoker : public WorkTask { public: - Invoker(F&& f, P&& p, std::shared_ptr> canceled_ = nullptr) + Invoker(F&& f, P&& p, std::shared_ptr> canceled_ = nullptr) : canceled(std::move(canceled_)), func(std::move(f)), params(std::move(p)) { @@ -148,7 +148,7 @@ private: } std::recursive_mutex mutex; - std::shared_ptr> canceled; + std::shared_ptr> canceled; F func; P params; -- cgit v1.2.1