@@ -136,6 +136,7 @@ int qemu_madvise(void *addr, size_t len, int advice);
int qemu_create_pidfile(const char *filename);
int qemu_get_thread_id(void);
+void qemu_msleep(int);
#ifdef _WIN32
static inline void qemu_timersub(const struct timeval *val1,
@@ -39,7 +39,7 @@ extern int daemon(int, int);
#include "sysemu.h"
#include "trace.h"
#include "qemu_socket.h"
-
+#include <sys/poll.h>
int qemu_daemon(int nochdir, int noclose)
@@ -174,3 +174,8 @@ int qemu_utimensat(int dirfd, const char *path, const struct timespec *times,
return utimes(path, &tv[0]);
}
+
+void qemu_msleep(int msec)
+{
+ poll(NULL, 0, msec);
+}
@@ -112,3 +112,8 @@ int qemu_gettimeofday(qemu_timeval *tp)
Do not set errno on error. */
return 0;
}
+
+void qemu_msleep(int msec)
+{
+ Sleep(msec);
+}
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- osdep.h | 1 + oslib-posix.c | 7 ++++++- oslib-win32.c | 5 +++++ 3 files changed, 12 insertions(+), 1 deletions(-)