[K/N][New MM] Move RunInNewThread to the main ThreadSupport.hpp
Some of unit-tests for the C++ part of the stdlib will require thread state switching. In the new MM, we already have a helper function that allows us to scopely initialize the memory subsystem for a separate thread. This patch makes this helper available for tests in the main runtime module by moving it to the main ThreadSupport.hpp.
This commit is contained in:
committed by
TeamCityServer
parent
fc43fbf578
commit
482305cfb2
@@ -99,8 +99,7 @@ extern "C" void RestoreMemory(MemoryState*) {
|
||||
}
|
||||
|
||||
extern "C" void ClearMemoryForTests(MemoryState* state) {
|
||||
auto* threadData = FromMemoryState(state)->Get();
|
||||
threadData->ClearForTests();
|
||||
state->GetThreadData()->ClearForTests();
|
||||
}
|
||||
|
||||
extern "C" RUNTIME_NOTHROW OBJ_GETTER(AllocInstance, const TypeInfo* typeInfo) {
|
||||
|
||||
Reference in New Issue
Block a user