SWDEV-328274 - Move DLLMain from VDI layer to HIP/OCL layers
Change-Id: Idc84eb0db92d21a5ced8769fa1eae064b86c31b0
[ROCm/clr commit: 1fbc01a812]
This commit is contained in:
@@ -119,40 +119,4 @@ uint ReferenceCountedObject::release() {
|
||||
return newCount;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef DEBUG
|
||||
static int reportHook(int reportType, char* message, int* returnValue) {
|
||||
if (returnValue) {
|
||||
*returnValue = 1;
|
||||
}
|
||||
std::cerr << message;
|
||||
::exit(3);
|
||||
return TRUE;
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
|
||||
switch (reason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
#ifdef DEBUG
|
||||
if (!::getenv("AMD_OCL_ENABLE_MESSAGE_BOX")) {
|
||||
_CrtSetReportHook(reportHook);
|
||||
_set_error_mode(_OUT_TO_STDERR);
|
||||
}
|
||||
#endif // DEBUG
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
amd::shutDown();
|
||||
break;
|
||||
case DLL_THREAD_DETACH: {
|
||||
amd::Thread* thread = amd::Thread::current();
|
||||
delete thread;
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace amd
|
||||
|
||||
@@ -82,8 +82,6 @@ public:
|
||||
|
||||
inline bool Runtime::initialized() { return initialized_; }
|
||||
|
||||
extern void shutDown();
|
||||
|
||||
} // namespace amd
|
||||
|
||||
#endif /*RUNTIME_HPP_*/
|
||||
|
||||
Reference in New Issue
Block a user