summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-20 00:46:50 -0400
committerDavid Robillard <d@drobilla.net>2016-09-20 00:46:50 -0400
commitb40326d759a9b4b2db7eb930f9a32403d4a9227f (patch)
treec869673edea14dd894e250e73e5a591886ceeb3a /src
parent9a6c324f583806078d4e389e78d7971e6609d66d (diff)
downloadingen-b40326d759a9b4b2db7eb930f9a32403d4a9227f.tar.gz
ingen-b40326d759a9b4b2db7eb930f9a32403d4a9227f.tar.bz2
ingen-b40326d759a9b4b2db7eb930f9a32403d4a9227f.zip
Use C++11 thread_local
Diffstat (limited to 'src')
-rw-r--r--src/server/Engine.cpp4
-rw-r--r--src/server/ThreadManager.hpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 7baea132..c7ad5c09 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -61,8 +61,8 @@ using namespace std;
namespace Ingen {
namespace Server {
-Raul::ThreadVar<unsigned> ThreadManager::flags(0);
-bool ThreadManager::single_threaded(true);
+thread_local unsigned ThreadManager::flags(0);
+bool ThreadManager::single_threaded(true);
Engine::Engine(Ingen::World* world)
: _world(world)
diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp
index 4da93e97..bec7d614 100644
--- a/src/server/ThreadManager.hpp
+++ b/src/server/ThreadManager.hpp
@@ -20,7 +20,6 @@
#include <cassert>
#include "ingen/ingen.h"
-#include "raul/ThreadVar.hpp"
namespace Ingen {
namespace Server {
@@ -57,8 +56,8 @@ public:
/** Set to true during initialisation so ensure_thread doesn't fail.
* Defined in Engine.cpp
*/
- static bool single_threaded;
- static Raul::ThreadVar<unsigned> flags;
+ static bool single_threaded;
+ static thread_local unsigned flags;
};
} // namespace Server