mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 18:37:46 +08:00
Per https://learn.microsoft.com/en-us/windows/win32/dlls/dllmain, it's not safe to clean up resources in DllMain when fdwReason == DLL_PROCESS_DETACH and lpvReserved != NULL (the process is terminating), e.g. can result in a hang in some cases. Related-To: NEO-14121 Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
18 lines
377 B
C++
18 lines
377 B
C++
/*
|
|
* Copyright (C) 2020-2025 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "opencl/source/global_teardown/global_platform_teardown.h"
|
|
|
|
namespace NEO {
|
|
void __attribute__((constructor)) platformsConstructor() {
|
|
globalPlatformSetup();
|
|
}
|
|
void __attribute__((destructor)) platformsDestructor() {
|
|
globalPlatformTeardown(false);
|
|
}
|
|
} // namespace NEO
|