[K/N] Remove certain pthread functions from runnable allow list

^KT-50713

Merge-request: KT-MR-5417
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
Alexander Shabalin
2022-01-14 12:20:30 +00:00
committed by Space
parent bb6c6dc45d
commit c15b1ec001
4 changed files with 34 additions and 15 deletions
@@ -245,6 +245,9 @@ void Kotlin_shutdownRuntime() {
if (!needsFullShutdown) {
auto lastStatus = compareAndSwap(&globalRuntimeStatus, kGlobalRuntimeRunning, kGlobalRuntimeShutdown);
RuntimeAssert(lastStatus == kGlobalRuntimeRunning, "Invalid runtime status for shutdown");
// The main thread is not doing anything Kotlin anymore, but will stick around to cleanup C++ globals and the like.
// Mark the thread native, and don't make the GC thread wait on it.
kotlin::SwitchThreadState(runtime->memoryState, kotlin::ThreadState::kNative);
return;
}