aboutsummaryrefslogtreecommitdiff
path: root/replay/replay-internal.h
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2015-09-17 19:23:54 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-11-05 12:19:09 +0100
commit26bc60ac82f88d14e65be5387eb4a136edf94f1b (patch)
tree978afbc06fc76ae179e5a1fceab66439bc5eef05 /replay/replay-internal.h
parentc16861ef1b7b27803b4c068ef778ba0f80fba1c2 (diff)
replay: introduce icount event
This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162354.8676.31351.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'replay/replay-internal.h')
-rw-r--r--replay/replay-internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/replay/replay-internal.h b/replay/replay-internal.h
index 8a0de0d8d8..ff4fabc326 100644
--- a/replay/replay-internal.h
+++ b/replay/replay-internal.h
@@ -14,6 +14,20 @@
#include <stdio.h>
+enum ReplayEvents {
+ /* for instruction event */
+ EVENT_INSTRUCTION,
+ EVENT_COUNT
+};
+
+typedef struct ReplayState {
+ /*! Current step - number of processed instructions and timer events. */
+ uint64_t current_step;
+ /*! Number of instructions to be executed before other events happen. */
+ int instructions_count;
+} ReplayState;
+extern ReplayState replay_state;
+
extern unsigned int replay_data_kind;
/* File for replay writing */
@@ -50,4 +64,11 @@ void replay_finish_event(void);
replay_data_kind variable. */
void replay_fetch_data_kind(void);
+/*! Saves queued events (like instructions and sound). */
+void replay_save_instructions(void);
+
+/*! Skips async events until some sync event will be found.
+ \return true, if event was found */
+bool replay_next_event_is(int event);
+
#endif