Skip to content
Permalink
Browse files

Fix #6218

  • Loading branch information...
ashdnazg committed May 5, 2019
1 parent 07dc87b commit e58208c0f89310c689f6490b9a1780adeee3871f
Showing with 5 additions and 4 deletions.
  1. +4 −1 rts/System/Platform/Threading.cpp
  2. +1 −3 rts/System/Platform/Threading.h
@@ -29,7 +29,9 @@


namespace Threading {
#ifndef WIN32
thread_local std::shared_ptr<ThreadControls> localThreadControls;
#endif

static NativeThreadId nativeThreadIDs[THREAD_IDX_LAST] = {};
static Error threadError;
@@ -314,8 +316,9 @@ namespace Threading {
#endif
case THREAD_IDX_WDOG: { return; } break;
}

#ifndef WIN32
SetupCurrentThreadControls(localThreadControls);
#endif
}

void SetMainThread() { SetThreadID(THREAD_IDX_MAIN); }
@@ -77,8 +77,6 @@ namespace Threading {

#ifndef WIN32
void SetupCurrentThreadControls(std::shared_ptr<ThreadControls>& threadCtls);
#else
static inline void SetupCurrentThreadControls(std::shared_ptr<ThreadControls>& threadCtls) {}
#endif

/**
@@ -182,7 +180,7 @@ namespace Threading {
memset(e.caption, 0, sizeof(caption));
memset(e.message, 0, sizeof(message));

flags = e.flags;
flags = e.flags;
e.flags = 0;
return *this;
}

0 comments on commit e58208c

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