diff options
author | David Robillard <d@drobilla.net> | 2020-08-02 11:06:09 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 12:51:11 +0200 |
commit | eed5d1a0b066a325c4c0640943c31a90ef4d0353 (patch) | |
tree | 844aad202c9e42a60d74bbbcbbaa75cdc50c2a38 | |
parent | d6d3cfeb3fc8dfd73998c2fee5f319b75f6757ff (diff) | |
download | ingen-eed5d1a0b066a325c4c0640943c31a90ef4d0353.tar.gz ingen-eed5d1a0b066a325c4c0640943c31a90ef4d0353.tar.bz2 ingen-eed5d1a0b066a325c4c0640943c31a90ef4d0353.zip |
Remove support for ancient compilers without thread_local support
-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') |