aboutsummaryrefslogtreecommitdiff
path: root/replay/replay-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'replay/replay-events.c')
-rw-r--r--replay/replay-events.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/replay/replay-events.c b/replay/replay-events.c
index 768b505f3d..e858254074 100644
--- a/replay/replay-events.c
+++ b/replay/replay-events.c
@@ -67,7 +67,9 @@ static void replay_run_event(Event *event)
void replay_enable_events(void)
{
- events_enabled = true;
+ if (replay_mode != REPLAY_MODE_NONE) {
+ events_enabled = true;
+ }
}
bool replay_has_events(void)
@@ -141,7 +143,7 @@ void replay_add_event(ReplayAsyncEventKind event_kind,
void replay_bh_schedule_event(QEMUBH *bh)
{
- if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
+ if (events_enabled) {
uint64_t id = replay_get_current_step();
replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL, id);
} else {
@@ -161,7 +163,7 @@ void replay_add_input_sync_event(void)
void replay_block_event(QEMUBH *bh, uint64_t id)
{
- if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
+ if (events_enabled) {
replay_add_event(REPLAY_ASYNC_EVENT_BLOCK, bh, NULL, id);
} else {
qemu_bh_schedule(bh);