Sysman: Add support for sysman APIs

In level_zero/sysman directory This change:
- Adds support for accessing linux based filesystem
- Add support for telemetry
- Add support for LinuxSysmanImp

Related-To: LOCI-3889
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2023-02-14 15:03:52 +00:00
committed by Compute-Runtime-Automation
parent 3ebcb30244
commit 6968d26f3a
41 changed files with 2652 additions and 45 deletions

View File

@@ -54,6 +54,7 @@ int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void *arg) =
int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout) = nullptr;
ssize_t (*sysCallsRead)(int fd, void *buf, size_t count) = nullptr;
int (*sysCallsFstat)(int fd, struct stat *buf) = nullptr;
char *(*sysCallsRealpath)(const char *path, char *buf) = nullptr;
int close(int fileDescriptor) {
closeFuncCalled++;
@@ -219,5 +220,12 @@ int fcntl(int fd, int cmd, int arg) {
return 0;
}
char *realpath(const char *path, char *buf) {
if (sysCallsRealpath != nullptr) {
return sysCallsRealpath(path, buf);
}
return nullptr;
}
} // namespace SysCalls
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@ extern int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void
extern int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout);
extern ssize_t (*sysCallsRead)(int fd, void *buf, size_t count);
extern int (*sysCallsFstat)(int fd, struct stat *buf);
extern char *(*sysCallsRealpath)(const char *path, char *buf);
extern const char *drmVersion;
constexpr int fakeFileDescriptor = 123;