refactor: Remove globaly enabled cl_cache

Current behaviour will be detecd path existence

Related-To: NEO-4262

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
This commit is contained in:
Diedrich, Kamil
2023-04-27 08:42:36 +00:00
committed by Compute-Runtime-Automation
parent ef10c98497
commit 5149d74141
46 changed files with 204 additions and 165 deletions

View File

@@ -14,6 +14,7 @@
#include <iostream>
#include <poll.h>
#include <stdio.h>
#include <string>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -25,6 +26,16 @@ namespace NEO {
namespace SysCalls {
bool pathExists(const std::string &path) {
struct stat statbuf = {};
if (stat(path.c_str(), &statbuf) == -1) {
return false;
}
return (statbuf.st_mode & S_IFDIR) != 0;
}
void exit(int code) {
std::exit(code);
}

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
namespace NEO {
namespace SysCalls {
@@ -17,6 +19,8 @@ unsigned long getNumThreads();
void exit(int code);
bool pathExists(const std::string &path);
} // namespace SysCalls
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/os_interface/windows/sys_calls.h"
#include <cstdlib>
#include <string>
namespace NEO {
@@ -39,6 +40,12 @@ unsigned long getNumThreads() {
return 1;
}
bool pathExists(const std::string &path) {
DWORD ret = GetFileAttributesA(path.c_str());
return ret == FILE_ATTRIBUTE_DIRECTORY;
}
HANDLE createEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) {
return CreateEventA(lpEventAttributes, bManualReset, bInitialState, lpName);
}