aboutsummaryrefslogtreecommitdiff
path: root/replay/replay-events.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-02-27 12:52:03 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 16:12:50 +0100
commit1a96e3c1e7dbb466a8c93743b8f5ae37cc023766 (patch)
tree267e310dd49d9433340df44d4d32267ceceee6b4 /replay/replay-events.c
parent5f3bdfd4fa33255542a4b6249913d9ffb11b44f9 (diff)
downloadqemu-1a96e3c1e7dbb466a8c93743b8f5ae37cc023766.zip
qemu-1a96e3c1e7dbb466a8c93743b8f5ae37cc023766.tar.gz
qemu-1a96e3c1e7dbb466a8c93743b8f5ae37cc023766.tar.bz2
replay: fix processing async events
Asynchronous events saved at checkpoints may invoke callbacks when processed. These callbacks may also generate/read new events (e.g. clock reads). Therefore event processing flag must be reset before callback invocation. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095203.1060.70831.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'replay/replay-events.c')
-rw-r--r--replay/replay-events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/replay/replay-events.c b/replay/replay-events.c
index 94a6dcc..768b505 100644
--- a/replay/replay-events.c
+++ b/replay/replay-events.c
@@ -295,13 +295,13 @@ void replay_read_events(int checkpoint)
if (!event) {
break;
}
+ replay_finish_event();
+ read_event_kind = -1;
replay_mutex_unlock();
replay_run_event(event);
replay_mutex_lock();
g_free(event);
- replay_finish_event();
- read_event_kind = -1;
}
}