diff options
author | David Robillard <d@drobilla.net> | 2016-10-01 19:50:38 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-10-01 19:50:38 -0400 |
commit | c73c877f8bd09e0d5a6663ea5ba32a54465f5376 (patch) | |
tree | 185f2da0e58e1c2ab75c4d9db851cf6fc7ca90ee /src | |
parent | 604015aa65de7d84f177b53e578a8c9852d7893f (diff) | |
download | ingen-c73c877f8bd09e0d5a6663ea5ba32a54465f5376.tar.gz ingen-c73c877f8bd09e0d5a6663ea5ba32a54465f5376.tar.bz2 ingen-c73c877f8bd09e0d5a6663ea5ba32a54465f5376.zip |
Fix OSX build
Diffstat (limited to 'src')
-rw-r--r-- | src/server/Engine.cpp | 4 | ||||
-rw-r--r-- | src/server/PreProcessor.cpp | 2 | ||||
-rw-r--r-- | src/server/ThreadManager.hpp | 6 | ||||
-rw-r--r-- | src/server/events/Mark.hpp | 2 | ||||
-rw-r--r-- | src/server/util.hpp | 8 |
5 files changed, 16 insertions, 6 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 097b38fc..259dbffd 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -61,8 +61,8 @@ using namespace std; namespace Ingen { namespace Server { -thread_local unsigned ThreadManager::flags(0); -bool ThreadManager::single_threaded(true); +INGEN_THREAD_LOCAL unsigned ThreadManager::flags(0); +bool ThreadManager::single_threaded(true); Engine::Engine(Ingen::World* world) : _world(world) diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp index 2ea4ac30..f0008afc 100644 --- a/src/server/PreProcessor.cpp +++ b/src/server/PreProcessor.cpp @@ -89,7 +89,7 @@ PreProcessor::process(RunContext& context, PostProcessor& dest, size_t limit) Event* ev = head; Event* last = ev; while (ev && ev->is_prepared()) { - switch (_block_state) { + switch (_block_state.load()) { case BlockState::UNBLOCKED: break; case BlockState::PRE_BLOCKED: diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp index bec7d614..3bcedf30 100644 --- a/src/server/ThreadManager.hpp +++ b/src/server/ThreadManager.hpp @@ -21,6 +21,8 @@ #include "ingen/ingen.h" +#include "util.hpp" + namespace Ingen { namespace Server { @@ -56,8 +58,8 @@ public: /** Set to true during initialisation so ensure_thread doesn't fail. * Defined in Engine.cpp */ - static bool single_threaded; - static thread_local unsigned flags; + static bool single_threaded; + static INGEN_THREAD_LOCAL unsigned flags; }; } // namespace Server diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp index a68e3b3b..d2db0834 100644 --- a/src/server/events/Mark.hpp +++ b/src/server/events/Mark.hpp @@ -48,7 +48,7 @@ public: void execute(RunContext& context); void post_process(); - Execution get_execution() const override; + Execution get_execution() const; private: Type _type; diff --git a/src/server/util.hpp b/src/server/util.hpp index d6377a9e..7d30cc8f 100644 --- a/src/server/util.hpp +++ b/src/server/util.hpp @@ -35,6 +35,14 @@ # define REALTIME #endif +#if defined(INGEN_HAVE_THREAD_LOCAL) +# define INGEN_THREAD_LOCAL thread_local +#elif defined(INGEN_HAVE_THREAD_BUILTIN) +# define INGEN_THREAD_LOCAL __thread +#else +# define INGEN_THREAD_LOCAL +#endif + namespace Ingen { namespace Server { |