[K/N][Runtime] Switch thread states in termination handlers

This commit is contained in:
Ilya Matveev
2021-07-19 20:14:14 +07:00
committed by Space
parent a1f6c70355
commit 99bd26c2ef
15 changed files with 536 additions and 126 deletions
+3 -2
View File
@@ -388,10 +388,11 @@ public:
namespace kotlin {
namespace mm {
// Returns the MemoryState for the current thread. The runtime must be initialized.
// Returns the MemoryState for the current thread.
// If the memory subsystem isn't initialized for the current thread, returns nullptr.
// Try not to use it very often, as (1) thread local access can be slow on some platforms,
// (2) TLS gets deallocated before our thread destruction hooks run.
MemoryState* GetMemoryState();
MemoryState* GetMemoryState() noexcept;
} // namespace mm