qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 4/9] replay: simplify async event processing


From: Pavel Dovgalyuk
Subject: Re: [PATCH v3 4/9] replay: simplify async event processing
Date: Thu, 26 May 2022 12:53:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

On 26.05.2022 12:40, Paolo Bonzini wrote:
On 5/26/22 10:45, Pavel Dovgalyuk wrote:
+
+typedef enum ReplayAsyncEventKind {
+    REPLAY_ASYNC_EVENT_BH,
+    REPLAY_ASYNC_EVENT_BH_ONESHOT,
+    REPLAY_ASYNC_EVENT_INPUT,
+    REPLAY_ASYNC_EVENT_INPUT_SYNC,
+    REPLAY_ASYNC_EVENT_CHAR_READ,
+    REPLAY_ASYNC_EVENT_BLOCK,
+    REPLAY_ASYNC_EVENT_NET,
+    REPLAY_ASYNC_COUNT
+} ReplayAsyncEventKind;
+
  /* Any changes to order/number of events will need to bump REPLAY_VERSION */
  enum ReplayEvents {
      /* for instruction event */
@@ -22,6 +35,7 @@ enum ReplayEvents {
      EVENT_EXCEPTION,
      /* for async events */
      EVENT_ASYNC,
+    EVENT_ASYNC_LAST = EVENT_ASYNC + REPLAY_ASYNC_COUNT - 1,

Why not unify the two enums into one?

ReplayAsyncEventKind is used as a variable type.
I think narrow type describes the value better than common enum.


Paolo




reply via email to

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