From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Subject: [Qemu-devel] [PATCH v2] rename get_clock_realtime
Date: Fri, 20 Jan 2012 12:28:33 +0100 [thread overview]
Message-ID: <1327058913-7934-1-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <4F194F4E.9060901@redhat.com>
get_clock_realtime accesses the host_clock, not the rt_clock.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
v1->v2: remove incorrect comment
qemu-timer.c | 2 +-
qemu-timer.h | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index cd026c6..4a14a6d 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -436,7 +436,7 @@ int64_t qemu_get_clock_ns(QEMUClock *clock)
return cpu_get_clock();
}
case QEMU_CLOCK_HOST:
- now = get_clock_realtime();
+ now = get_clock_host();
last = clock->last;
clock->last = now;
if (now < last) {
diff --git a/qemu-timer.h b/qemu-timer.h
index de17f3b..a61f209 100644
--- a/qemu-timer.h
+++ b/qemu-timer.h
@@ -92,8 +92,7 @@ static inline int64_t get_ticks_per_sec(void)
return 1000000000LL;
}
-/* real time host monotonic timer */
-static inline int64_t get_clock_realtime(void)
+static inline int64_t get_clock_host(void)
{
struct timeval tv;
@@ -131,7 +130,7 @@ static inline int64_t get_clock(void)
{
/* XXX: using gettimeofday leads to problems if the date
changes, so it should be avoided. */
- return get_clock_realtime();
+ return get_clock_host();
}
}
#endif
--
1.7.7.1
next prev parent reply other threads:[~2012-01-20 11:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 11:05 [Qemu-devel] [PATCH] rename get_clock_realtime Paolo Bonzini
2012-01-20 11:17 ` Jan Kiszka
2012-01-20 11:26 ` Paolo Bonzini
2012-01-20 11:28 ` Paolo Bonzini [this message]
2012-01-20 11:29 ` Jan Kiszka
2012-01-20 11:39 ` 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=1327058913-7934-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=jan.kiszka@siemens.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).