noux: add SYSCALL_SYNC
File systems using the File_system_session interface can now be synchronized by using this syscall. This is needed for file system that maintain an internal cache, which should be flushed. Fixes #1008.
This commit is contained in:
committed by
Norman Feske
parent
e1370b558e
commit
f71e38702f
@@ -75,6 +75,7 @@ namespace Noux {
|
||||
SYSCALL_GETTIMEOFDAY,
|
||||
SYSCALL_CLOCK_GETTIME,
|
||||
SYSCALL_UTIMES,
|
||||
SYSCALL_SYNC,
|
||||
SYSCALL_INVALID = -1
|
||||
};
|
||||
|
||||
@@ -122,6 +123,7 @@ namespace Noux {
|
||||
NOUX_DECL_SYSCALL_NAME(GETTIMEOFDAY)
|
||||
NOUX_DECL_SYSCALL_NAME(CLOCK_GETTIME)
|
||||
NOUX_DECL_SYSCALL_NAME(UTIMES)
|
||||
NOUX_DECL_SYSCALL_NAME(SYNC)
|
||||
case SYSCALL_INVALID: return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -494,6 +494,8 @@ namespace Noux {
|
||||
|
||||
SYSIO_DECL(utimes, { Path path; unsigned long sec; unsigned long usec; },
|
||||
{ });
|
||||
|
||||
SYSIO_DECL(sync, { }, { });
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user