From b40326d759a9b4b2db7eb930f9a32403d4a9227f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 Sep 2016 00:46:50 -0400 Subject: Use C++11 thread_local --- src/server/Engine.cpp | 4 ++-- src/server/ThreadManager.hpp | 5 ++--- 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 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 #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 flags; + static bool single_threaded; + static thread_local unsigned flags; }; } // namespace Server -- cgit v1.2.1