summaryrefslogtreecommitdiff
path: root/include/mbgl/util/util.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-01-16 14:04:41 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-02-04 10:46:37 +0100
commitb9bf66e67ed1d0d1b1d3163255cab099a6ba4a95 (patch)
tree93ad6df882442e18d9a9771d4b4f06a0a764a0a9 /include/mbgl/util/util.hpp
parent3bfea8bf30c978173f1ec2fab6f89d6b33afea86 (diff)
downloadqtlocation-mapboxgl-b9bf66e67ed1d0d1b1d3163255cab099a6ba4a95.tar.gz
rewrite storage layer to be independent of the Map's event loop
Diffstat (limited to 'include/mbgl/util/util.hpp')
-rw-r--r--include/mbgl/util/util.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/mbgl/util/util.hpp b/include/mbgl/util/util.hpp
new file mode 100644
index 0000000000..bf5dad3c01
--- /dev/null
+++ b/include/mbgl/util/util.hpp
@@ -0,0 +1,15 @@
+#ifndef MBGL_UTIL_UTIL
+#define MBGL_UTIL_UTIL
+
+#include <thread>
+
+#ifndef NDEBUG
+#include <thread>
+#define MBGL_STORE_THREAD(tid) const std::thread::id tid = std::this_thread::get_id();
+#define MBGL_VERIFY_THREAD(tid) assert(tid == std::this_thread::get_id());
+#else
+#define MBGL_STORE_THREAD(tid)
+#define MBGL_VERIFY_THREAD(tid)
+#endif
+
+#endif