Move main thread check to legacy mm (#4483)
This commit is contained in:
committed by
Stanislav Erokhin
parent
14526e57bc
commit
8dc5b95337
@@ -69,7 +69,6 @@ KBoolean g_checkLeakedCleaners = KonanNeedDebugInfo;
|
||||
constexpr RuntimeState* kInvalidRuntime = nullptr;
|
||||
|
||||
THREAD_LOCAL_VARIABLE RuntimeState* runtimeState = kInvalidRuntime;
|
||||
THREAD_LOCAL_VARIABLE int isMainThread = 0;
|
||||
|
||||
inline bool isValidRuntime() {
|
||||
return ::runtimeState != kInvalidRuntime;
|
||||
@@ -88,7 +87,6 @@ RuntimeState* initRuntime() {
|
||||
bool firstRuntime = atomicAdd(&aliveRuntimesCount, 1) == 1;
|
||||
// Keep global variables in state as well.
|
||||
if (firstRuntime) {
|
||||
isMainThread = 1;
|
||||
konan::consoleInit();
|
||||
#if KONAN_OBJC_INTEROP
|
||||
Kotlin_ObjCExport_initialize();
|
||||
@@ -151,11 +149,6 @@ void Kotlin_deinitRuntimeIfNeeded() {
|
||||
}
|
||||
}
|
||||
|
||||
void CheckIsMainThread() {
|
||||
if (!isMainThread)
|
||||
ThrowIncorrectDereferenceException();
|
||||
}
|
||||
|
||||
KInt Konan_Platform_canAccessUnaligned() {
|
||||
#if KONAN_NO_UNALIGNED_ACCESS
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user