replay: move internal data to the structure

This patch moves replay static variables into the structure
to allow saving and loading them with savevm/loadvm.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20160926080804.6992.87687.stgit@PASHA-ISP>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Pavel Dovgalyuk 2016-09-26 11:08:04 +03:00 committed by Paolo Bonzini
parent c265e976f4
commit f186d64d8f
5 changed files with 24 additions and 23 deletions

View file

@ -62,11 +62,13 @@ typedef struct ReplayState {
uint64_t current_step;
/*! Number of instructions to be executed before other events happen. */
int instructions_count;
/*! Type of the currently executed event. */
unsigned int data_kind;
/*! Flag which indicates that event is not processed yet. */
unsigned int has_unread_data;
} ReplayState;
extern ReplayState replay_state;
extern unsigned int replay_data_kind;
/* File for replay writing */
extern FILE *replay_file;
@ -98,7 +100,7 @@ void replay_check_error(void);
the next event from the log. */
void replay_finish_event(void);
/*! Reads data type from the file and stores it in the
replay_data_kind variable. */
data_kind variable. */
void replay_fetch_data_kind(void);
/*! Saves queued events (like instructions and sound). */