Threads: move linux m_timer to static thread_local variable

Allows lazy allocation of the timer handle.
This commit is contained in:
Nekotekina 2020-03-03 16:36:59 +03:00
parent 5b0476e772
commit 6c66153372
2 changed files with 30 additions and 23 deletions

View file

@ -97,11 +97,6 @@ class thread_base
using native_entry = void*(*)(void* arg);
#endif
#ifdef __linux__
// Linux thread timer
int m_timer = -1;
#endif
// Thread handle (platform-specific)
atomic_t<std::uintptr_t> m_thread{0};