SWDEV-520352 - Remove HostThread and legacy monitor (#230)

* SWDEV-520352 - Remove HostThread and legacy monitor

Remove HostThread, semaphore and  legacy monitor.
Make original logics of thread and command queue stricker.
Add more comments to make logics clearer.
Some other minor improvement.

Also part of SWDEV-458943.
This commit is contained in:
Sang, Tao
2025-04-29 09:55:24 -04:00
committed by GitHub
parent 99ef573399
commit 96cadbc9e9
15 changed files with 34 additions and 898 deletions
+4 -11
View File
@@ -51,18 +51,11 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
#endif // DEBUG
hip::PlatformState::instance().setDynamicLibraryHandle(static_cast<void*>(hinst));
break;
case DLL_PROCESS_DETACH: {
amd::Thread* thread = amd::Thread::current();
if (!(thread != nullptr ||
((thread = new amd::HostThread()) != nullptr && thread == amd::Thread::current()))) {
return true;
}
case DLL_PROCESS_DETACH:
hip::ihipDestroyDevice();
} break;
case DLL_THREAD_DETACH: {
amd::Thread* thread = amd::Thread::current();
delete thread;
} break;
break;
case DLL_THREAD_DETACH:
break;
default:
break;
}