mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add mmap and munmap to SysCalls
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
8523747f91
commit
3c1288de09
@ -40,6 +40,8 @@ constexpr unsigned long int invalidIoctl = static_cast<unsigned long int>(-1);
|
||||
int setErrno = 0;
|
||||
int fstatFuncRetVal = 0;
|
||||
uint32_t preadFuncCalled = 0u;
|
||||
uint32_t mmapFuncCalled = 0u;
|
||||
uint32_t munmapFuncCalled = 0u;
|
||||
|
||||
int close(int fileDescriptor) {
|
||||
closeFuncCalled++;
|
||||
@ -137,5 +139,15 @@ ssize_t pread(int fd, void *buf, size_t count, off_t offset) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *mmap(void *addr, size_t size, int prot, int flags, int fd, off_t off) {
|
||||
mmapFuncCalled++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int munmap(void *addr, size_t size) {
|
||||
munmapFuncCalled++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace SysCalls
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user