[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/27] cpus: rename local variable to meaningful one
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 15/27] cpus: rename local variable to meaningful one |
Date: |
Wed, 14 Sep 2016 10:58:41 +0300 |
From: Cao jin <address@hidden>
The function actually returns monotonic time value in nanosecond,
the "ticks" is not suitable.
Cc: Paolo Bonzini <address@hidden>
Cc Peter Crosthwaite <address@hidden>
Cc: Richard Henderson <address@hidden>
Signed-off-by: Cao jin <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
cpus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index 0ab4ab1..a70b536 100644
--- a/cpus.c
+++ b/cpus.c
@@ -219,14 +219,14 @@ int64_t cpu_get_ticks(void)
static int64_t cpu_get_clock_locked(void)
{
- int64_t ticks;
+ int64_t time;
- ticks = timers_state.cpu_clock_offset;
+ time = timers_state.cpu_clock_offset;
if (timers_state.cpu_ticks_enabled) {
- ticks += get_clock();
+ time += get_clock();
}
- return ticks;
+ return time;
}
/* return the host CPU monotonic time */
--
2.1.4
- [Qemu-devel] [PULL 07/27] MAINTAINERS: Add include/sysemu/cpus.h, (continued)
- [Qemu-devel] [PULL 07/27] MAINTAINERS: Add include/sysemu/cpus.h, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 21/27] s390x: remove useless cast, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 10/27] MAINTAINERS: Fix up F: entry bit rot, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 03/27] ui/console: Fix non-working backspace key in monitor of gtk UI, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 26/27] linux-user/qemu.h: change malloc to g_malloc, free to g_free, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 19/27] coccinelle: add a script to remove useless casts, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 05/27] MAINTAINERS: Add include/hw/tricore/ to TriCore section, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 08/27] MAINTAINERS: Fix wildcard for scsi headers, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 16/27] cpus: update comments, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 20/27] linux-user,s390x: remove useless cast, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 15/27] cpus: rename local variable to meaningful one,
Michael Tokarev <=
- [Qemu-devel] [PULL 12/27] help: Update help to remove misleading display information, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 11/27] sh4: fix broken link to documentation, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 17/27] Remove unused function declarations, Michael Tokarev, 2016/09/14
- [Qemu-devel] [PULL 24/27] sheepdog: remove useless casts, Michael Tokarev, 2016/09/14
- Re: [Qemu-devel] [PULL 00/27] Trivial patches for 2016-09-14, no-reply, 2016/09/14