refactor: remove redundant getPid()

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-07-22 15:52:02 +00:00
committed by Compute-Runtime-Automation
parent 899bda3263
commit 0800ab54f5
5 changed files with 2 additions and 15 deletions

View File

@@ -12,10 +12,6 @@
namespace NEO {
unsigned int getPid() {
return GetCurrentProcessId();
}
bool isShutdownInProgress() {
auto handle = GetModuleHandleA("ntdll.dll");

View File

@@ -1002,7 +1002,7 @@ bool Wddm::createContext(OsContextWin &osContext) {
CREATECONTEXT_PVTDATA privateData = initPrivateData(osContext);
privateData.ProcessID = NEO::getPid();
privateData.ProcessID = NEO::SysCalls::getProcessId();
privateData.pHwContextId = &hwContextId;
privateData.NoRingFlushes = debugManager.flags.UseNoRingFlushesKmdMode.get();

View File

@@ -46,7 +46,6 @@ struct WorkaroundTable;
enum class HeapIndex : uint32_t;
unsigned int readEnablePreemptionRegKey();
unsigned int getPid();
bool isShutdownInProgress();
CREATECONTEXT_PVTDATA initPrivateData(OsContextWin &osContext);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -17,10 +17,6 @@ bool isShutdownInProgress() {
return false;
}
unsigned int getPid() {
return static_cast<uint32_t>(getpid());
}
unsigned int readEnablePreemptionRegKey() {
return 1;
}

View File

@@ -433,10 +433,6 @@ bool isShutdownInProgress() {
return false;
}
unsigned int getPid() {
return 0xABCEDF;
}
unsigned int readEnablePreemptionRegKey() {
return 1;
}