From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH 07/13] osdep: add qemu_msleep
Date: Mon, 15 Aug 2011 14:08:34 -0700 [thread overview]
Message-ID: <1313442520-12062-8-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1313442520-12062-1-git-send-email-pbonzini@redhat.com>
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(-)
diff --git a/osdep.h b/osdep.h
index a817017..6bf4e1c 100644
--- a/osdep.h
+++ b/osdep.h
@@ -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,
diff --git a/oslib-posix.c b/oslib-posix.c
index 196099c..bcbe6a7 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -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);
+}
diff --git a/oslib-win32.c b/oslib-win32.c
index 5f0759f..d823931 100644
--- a/oslib-win32.c
+++ b/oslib-win32.c
@@ -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);
+}
--
1.7.6
next prev parent reply other threads:[~2011-08-15 21:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 21:08 [Qemu-devel] [RFC PATCH 00/13] RCU implementation for QEMU Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 01/13] add smp_mb() Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 02/13] rename qemu_event_{init,read} Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 03/13] qemu-threads: add QemuEvent Paolo Bonzini
2011-08-17 17:09 ` Blue Swirl
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 04/13] qemu-threads: add QemuOnce Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 05/13] add rcu library Paolo Bonzini
2011-08-17 17:04 ` Blue Swirl
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 06/13] rcu: add rcutorture Paolo Bonzini
2011-08-15 21:08 ` Paolo Bonzini [this message]
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 08/13] add call_rcu support Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 09/13] rcu: avoid repeated system calls Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 10/13] rcu: report quiescent states Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 11/13] rcuify iohandlers Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 12/13] split MRU ram list Paolo Bonzini
2011-08-15 21:08 ` [Qemu-devel] [RFC PATCH 13/13] RCUify ram_list Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313442520-12062-8-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).