qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 5/7] monitor: remove event_clock_type


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v9 5/7] monitor: remove event_clock_type
Date: Wed, 30 May 2018 17:35:52 +0100
User-agent: Mutt/1.9.5 (2018-04-13)

On Tue, May 29, 2018 at 01:57:53PM +0800, Peter Xu wrote:
> Instead, use a dynamic function to detect which clock we'll use.  The
> problem is that the old code will let monitor initialization depends on
> qtest_enabled().  After this change, we don't have such a dependency any
> more.

There is a hidden dependency:

  monitor_get_clock() returns the wrong value before main() has
  processed command-line arguments.

Where is the guarantee that monitor_get_clock() is never called too
early?

At the least, monitor_get_clock() should call abort(3) if invoked too
early.  Even better would be an interface that cannot be used
incorrectly.

Attachment: signature.asc
Description: PGP signature


reply via email to

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