mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-22 19:29:06 +08:00
refactor: remove not needed function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d859698cb5
commit
c934877790
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/windows/environment_variables.h"
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
||||
|
||||
uint32_t getEnvironmentVariable(const char *name, char *outBuffer, uint32_t outBufferSize) {
|
||||
if (NEO::debugManager.registryReadAvailable() == false) {
|
||||
return 0;
|
||||
}
|
||||
return GetEnvironmentVariableA(name, outBuffer, outBufferSize);
|
||||
}
|
||||
@@ -18,7 +18,6 @@ set(NEO_CORE_OS_INTERFACE_WINDOWS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}driver_info_windows_impl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/environment_variables.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_drm_stub.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties_windows.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_inc.h
|
||||
@@ -64,7 +63,6 @@ set(NEO_CORE_OS_INTERFACE_WDDM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_time_wddm.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_time_wddm.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/environment_variables.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gdi_interface.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gdi_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gdi_interface_logging.cpp
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
uint32_t getEnvironmentVariable(const char *name, char *outBuffer, uint32_t outBufferSize);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace NEO {
|
||||
namespace IoFunctions {
|
||||
@@ -41,6 +42,13 @@ inline int fprintf(FILE *fileDesc, char const *const formatStr, ...) {
|
||||
va_end(args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline bool getEnvToBool(const char *name) {
|
||||
const char *env = getenvPtr(name);
|
||||
if ((nullptr == env) || (0 == strcmp("0", env)))
|
||||
return false;
|
||||
return (0 == strcmp("1", env));
|
||||
}
|
||||
} // namespace IoFunctions
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -220,8 +220,6 @@ set(neo_libult_SRCS_WINDOWS
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/setup_external_dependencies_drm_or_wddm.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/sys_calls.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/wddm_calls.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/mock_environment_variables.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/mock_environment_variables.h
|
||||
)
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY neo_libult_SRCS_WINDOWS ${neo_libult_SRCS_WINDOWS})
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/os_interface/windows/mock_environment_variables.h"
|
||||
|
||||
#include "shared/source/os_interface/windows/environment_variables.h"
|
||||
|
||||
uint32_t (*getEnvironmentVariableMock)(const char *name, char *outBuffer, uint32_t outBufferSize) = nullptr;
|
||||
|
||||
uint32_t getEnvironmentVariable(const char *name, char *outBuffer, uint32_t outBufferSize) {
|
||||
if (getEnvironmentVariableMock == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
return getEnvironmentVariableMock(name, outBuffer, outBufferSize);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
extern uint32_t (*getEnvironmentVariableMock)(const char *name, char *outBuffer, uint32_t outBufferSize);
|
||||
Reference in New Issue
Block a user