Skip to content
Permalink
Browse files

minor

  • Loading branch information...
rt
rt committed Apr 30, 2019
1 parent 2a67839 commit 7b5b7981e73a2a93f909d0172d5bd66c2c3b639d
Showing with 5 additions and 8 deletions.
  1. +0 −4 rts/System/Platform/Linux/ThreadSupport.cpp
  2. +5 −4 rts/System/Platform/Threading.cpp
@@ -147,10 +147,6 @@ void SetupCurrentThreadControls(std::shared_ptr<ThreadControls>& threadCtls)

#ifndef WIN32
if (threadCtls.get() != nullptr) {
// do nothing if Load is actually Main (LoadingMT=0 case)
if (Threading::IsGameLoadThread())
return;

// old shared_ptr will be deleted by the reset below
LOG_L(L_WARNING, "[%s] thread already has ThreadControls installed", __func__);
} else {
@@ -295,14 +295,15 @@ namespace Threading {

static void SetThreadID(unsigned int threadIndex) {
// NOTE:
// the ID's of LOAD and SND always have to be set unconditionally since
// those two threads are joined and respawned when reloading, KISS here
// (while other threads never call Set*Thread more than once making the
// is-cached flags redundant anyway)
// LOAD and SND thread ID's always have to be set unconditionally
// (threads are joined and respawned when reloading, so KISS here)
// other threads never call Set*Thread more than once, no need for
// caching
nativeThreadIDs[threadIndex] = Threading::GetCurrentThreadId();

switch (threadIndex) {
case THREAD_IDX_LOAD: {
// do nothing if Load is actually Main (LoadingMT=0 case)
if (IsMainThread())
return;
} break;

0 comments on commit 7b5b798

Please sign in to comment.
You can’t perform that action at this time.