Add SysCall pwrite()

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-08-26 17:35:15 +00:00
committed by Compute-Runtime-Automation
parent f309cdff2f
commit e775dfa9a5
3 changed files with 9 additions and 0 deletions

View File

@@ -153,6 +153,10 @@ ssize_t pread(int fd, void *buf, size_t count, off_t offset) {
return 0;
}
ssize_t pwrite(int fd, const 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;

View File

@@ -25,6 +25,7 @@ int readlink(const char *path, char *buf, size_t bufsize);
int poll(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout);
int fstat(int fd, struct stat *buf);
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
void *mmap(void *addr, size_t size, int prot, int flags, int fd, off_t off);
int munmap(void *addr, size_t size);
} // namespace SysCalls

View File

@@ -71,6 +71,10 @@ ssize_t pread(int fd, void *buf, size_t count, off_t offset) {
return ::pread(fd, buf, count, offset);
}
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset) {
return ::pwrite(fd, buf, count, offset);
}
void *mmap(void *addr, size_t size, int prot, int flags, int fd, off_t off) {
return ::mmap(addr, size, prot, flags, fd, off);
}