1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Implement pread(2) and pwrite(2).

This commit is contained in:
Jonas 'Sortie' Termansen 2013-01-30 20:20:59 +01:00
parent 2231e129b0
commit d950421358
2 changed files with 8 additions and 6 deletions

View file

@ -36,8 +36,9 @@ retry:
return result;
}
extern "C" ssize_t pread(int, void*, size_t, off_t)
DEFN_SYSCALL4(ssize_t, sys_pread, SYSCALL_PREAD, int, void*, size_t, off_t);
extern "C" ssize_t pread(int fd, void* buf, size_t count, off_t offset)
{
errno = ENOSYS;
return -1;
return sys_pread(fd, buf, count, offset);
}

View file

@ -36,8 +36,9 @@ retry:
return result;
}
extern "C" ssize_t pwrite(int, const void*, size_t, off_t)
DEFN_SYSCALL4(ssize_t, sys_pwrite, SYSCALL_PWRITE, int, const void*, size_t, off_t);
extern "C" ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset)
{
errno = ENOSYS;
return -1;
return sys_pwrite(fd, buf, count, offset);
}