From 73991a922217a499ffb19fa254b1fda8bfac42c4 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 20 Apr 2022 17:26:03 +0400 Subject: include: move qemu_msync() to osdep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The implementation depends on the OS. (and longer-term goal is to move cutils to a common subproject) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-21-marcandre.lureau@redhat.com> --- util/oslib-win32.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'util/oslib-win32.c') diff --git a/util/oslib-win32.c b/util/oslib-win32.c index f38b06914e..1e05c316b3 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -596,3 +596,13 @@ size_t qemu_get_host_physmem(void) } return 0; } + +int qemu_msync(void *addr, size_t length, int fd) +{ + /** + * Perform the sync based on the file descriptor + * The sync range will most probably be wider than the one + * requested - but it will still get the job done + */ + return qemu_fdatasync(fd); +} -- cgit 1.4.1