qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 6/8] sysemu: generalise qtest_warp_clock as qemu_clock_ad


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 6/8] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time
Date: Sat, 20 May 2023 06:27:11 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 19/5/23 19:04, Alex Bennée wrote:
Move the key functionality of moving time forward into the clock
sub-system itself. This will allow us to plumb in time control into
plugins.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
  include/qemu/timer.h | 15 +++++++++++++++
  softmmu/qtest.c      | 24 ++----------------------
  util/qemu-timer.c    | 26 ++++++++++++++++++++++++++
  3 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index ee071e07d1..9a1a42a400 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -245,6 +245,21 @@ bool qemu_clock_run_timers(QEMUClockType type);
   */
  bool qemu_clock_run_all_timers(void);
+/**
+ * qemu_clock_advance_virtual_time(): advance the virtual time tick
+ * @target: target time in nanoseconds

Maybe '@target_ns'?

+ *
+ * This function is used where the control of the flow of time has
+ * been delegated to outside the clock subsystem (be it qtest, icount
+ * or some other external source). You can ask the clock system to
+ * return @early at the first expired timer.
+ *
+ * Time can only move forward, attempts to reverse time would lead to
+ * an error.
+ *
+ * Returns: new virtual time.
+ */
+int64_t qemu_clock_advance_virtual_time(int64_t dest);

s/dest/target[_ns]/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]