mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
- don't load ze_loader.dll from file system - to perform self-open on Windows use getModuleHandleA with proper module name - don't free library loaded with getModuleHandleA - as loader may be not available during runtime teardown: - load translate handle function during global setup - load setDriverTeardown function during global teardown - when loader is not available during teardown, unset translate handle function Related-To: GSD-10147 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
30 lines
581 B
C++
30 lines
581 B
C++
/*
|
|
* Copyright (C) 2019-2024 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/os_interface/os_library.h"
|
|
|
|
namespace NEO {
|
|
namespace Linux {
|
|
|
|
void adjustLibraryFlags(int &dlopenFlag);
|
|
|
|
class OsLibrary : public NEO::OsLibrary {
|
|
private:
|
|
void *handle;
|
|
|
|
public:
|
|
OsLibrary(const OsLibraryCreateProperties &properties);
|
|
~OsLibrary() override;
|
|
|
|
bool isLoaded() override;
|
|
void *getProcAddress(const std::string &procName) override;
|
|
std::string getFullPath() override;
|
|
};
|
|
} // namespace Linux
|
|
} // namespace NEO
|