Kernel: Implement SYS_SYNC and add sync executable to userspace
You can (and have to) manually sync disk after writes to it.
This commit is contained in:
@@ -54,6 +54,7 @@ __BEGIN_DECLS
|
||||
#define SYS_NANOSLEEP 47
|
||||
#define SYS_FSTATAT 48
|
||||
#define SYS_STAT 49 // stat/lstat
|
||||
#define SYS_SYNC 50
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -183,6 +183,11 @@ int chdir(const char* path)
|
||||
return syscall(SYS_SET_PWD, path);
|
||||
}
|
||||
|
||||
void sync(void)
|
||||
{
|
||||
syscall(SYS_SYNC);
|
||||
}
|
||||
|
||||
pid_t getpid(void)
|
||||
{
|
||||
return syscall(SYS_GET_PID);
|
||||
|
||||
Reference in New Issue
Block a user