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:
Josef Söntgen
2013-12-18 12:04:04 +01:00
committed by Norman Feske
parent e1370b558e
commit f71e38702f
8 changed files with 55 additions and 0 deletions

View File

@@ -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;

View File

@@ -494,6 +494,8 @@ namespace Noux {
SYSIO_DECL(utimes, { Path path; unsigned long sec; unsigned long usec; },
{ });
SYSIO_DECL(sync, { }, { });
};
};
};