Files
compute-runtime/opencl/source/os_interface/linux/platform_teardown_linux.cpp
Oskar Hubert Weber 9055ae8e54 fix: skip teardown clean up when terminating process on Windows
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>
2025-07-22 15:13:11 +02:00

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