Kernel/LibC: Implement fsync

This commit is contained in:
2024-12-02 03:42:49 +02:00
parent cccb4e6d5e
commit 747c3b2a4b
21 changed files with 140 additions and 35 deletions

View File

@@ -85,6 +85,7 @@ __BEGIN_DECLS
O(SYS_SETITIMER, setitimer) \
O(SYS_POSIX_OPENPT, posix_openpt) \
O(SYS_PTSNAME, ptsname) \
O(SYS_FSYNC, fsync) \
enum Syscall
{

View File

@@ -115,6 +115,11 @@ int ftruncate(int fildes, off_t length)
return syscall(SYS_TRUNCATE, fildes, length);
}
int fsync(int fildes)
{
return syscall(SYS_FSYNC, fildes);
}
int dup(int fildes)
{
return syscall(SYS_DUP, fildes);