diff options
-rw-r--r-- | src/server/Engine.cpp | 4 | ||||
-rw-r--r-- | src/server/ThreadManager.hpp | 4 | ||||
-rw-r--r-- | src/server/util.hpp | 8 | ||||
-rw-r--r-- | wscript | 9 |
4 files changed, 4 insertions, 21 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 3ac253b7..087be26c 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -65,8 +65,8 @@ namespace ingen { namespace server { -INGEN_THREAD_LOCAL 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 5f59208f..3619933f 100644 --- a/src/server/ThreadManager.hpp +++ b/src/server/ThreadManager.hpp @@ -58,8 +58,8 @@ public: /** Set to true during initialisation so ensure_thread doesn't fail. * Defined in Engine.cpp */ - static bool single_threaded; - static INGEN_THREAD_LOCAL unsigned flags; + static bool single_threaded; + static thread_local unsigned flags; }; } // namespace server diff --git a/src/server/util.hpp b/src/server/util.hpp index dd57bfc3..8c181023 100644 --- a/src/server/util.hpp +++ b/src/server/util.hpp @@ -35,14 +35,6 @@ # 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 { @@ -117,15 +117,6 @@ def configure(conf): }) conf.check_cxx(header_name='boost/intrusive/slist.hpp') - conf.check_cxx(msg='Checking for thread_local keyword', - mandatory=False, - fragment='thread_local int i = 0; int main() {}', - define_name='INGEN_HAVE_THREAD_LOCAL') - if not conf.is_defined('INGEN_HAVE_THREAD_LOCAL'): - conf.check_cxx(msg='Checking for __thread keyword', - mandatory=False, - fragment='__thread int i = 0; int main() {}', - define_name='INGEN_HAVE_THREAD_BUILTIN') conf.check_pkg('lv2 >= 1.16.0', uselib_store='LV2') conf.check_pkg('lilv-0 >= 0.21.5', uselib_store='LILV') |