From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjYQC-0006nU-Jm for qemu-devel@nongnu.org; Tue, 06 Oct 2015 16:01:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjYQB-0008DC-HE for qemu-devel@nongnu.org; Tue, 06 Oct 2015 16:01:12 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:37415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjYQB-0008Cy-Bm for qemu-devel@nongnu.org; Tue, 06 Oct 2015 16:01:11 -0400 Received: by wicfx3 with SMTP id fx3so174510887wic.0 for ; Tue, 06 Oct 2015 13:01:10 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 6 Oct 2015 22:00:58 +0200 Message-Id: <1444161658-15038-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1444161658-15038-1-git-send-email-pbonzini@redhat.com> References: <1444161658-15038-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] events doubts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pavel.dovgaluk@ispras.ru It is not clear what separates REPLAY_ASYNC_EVENT_BH from other async events. It seems to be an ordering issue, but then why do input events not have to be looked up in the queue? It would be much simpler if they are all handled the same way. --- replay/replay-events.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/replay/replay-events.c b/replay/replay-events.c index 402f644..d6c61f6 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -203,13 +203,15 @@ static Event *replay_read_event(int checkpoint) return NULL; } - /* Events that has not to be in the queue */ + /* Read event-specific data */ switch (read_event_kind) { case REPLAY_ASYNC_EVENT_BH: if (read_id == -1) { read_id = replay_get_qword(); } break; + + /* Events that do not have to be in the queue - ### WHY? */ case REPLAY_ASYNC_EVENT_INPUT: event = g_malloc0(sizeof(Event)); event->event_kind = read_event_kind; @@ -220,6 +222,7 @@ static Event *replay_read_event(int checkpoint) event->event_kind = read_event_kind; event->opaque = 0; return event; + default: error_report("Unknown ID %d of replay event", read_event_kind); exit(1); @@ -239,8 +242,6 @@ static Event *replay_read_event(int checkpoint) return NULL; } - /* Read event-specific data */ - return event; } -- 2.5.0