Kernel/LibC: Implement pread()

This commit is contained in:
2023-11-28 23:47:30 +02:00
parent 4c3da66c92
commit 09b7cb2f33
5 changed files with 19 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ __BEGIN_DECLS
#define SYS_READLINK 59
#define SYS_READLINKAT 60
#define SYS_MSYNC 61
#define SYS_PREAD 62
__END_DECLS

View File

@@ -88,6 +88,11 @@ ssize_t readlinkat(int fd, const char* __restrict path, char* __restrict buf, si
return syscall(SYS_READLINKAT, fd, path, buf, bufsize);
}
ssize_t pread(int fildes, void* buf, size_t nbyte, off_t offset)
{
return syscall(SYS_PREAD, fildes, buf, nbyte, offset);
}
int dup(int fildes)
{
return syscall(SYS_DUP, fildes);