[core] Naive atomic type for ARMv5
std::atomic<bool> 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.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "run_loop_impl.hpp"
|
||||
|
||||
#include <mbgl/util/async_task.hpp>
|
||||
#include <mbgl/util/atomic.hpp>
|
||||
#include <mbgl/util/run_loop.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
|
||||
namespace mbgl {
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
|
||||
// TODO: Use std::atomic_flag if we ever drop
|
||||
// support for ARMv5
|
||||
std::atomic<bool> queued;
|
||||
util::Atomic<bool> queued;
|
||||
std::function<void()> task;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user