mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
migration: Move postcopy stuff to postcopy-ram.c
Yes, we don't have a good place to put that stuff. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
aa3544c371
commit
bac3b21218
4 changed files with 44 additions and 44 deletions
|
@ -784,3 +784,21 @@ void postcopy_discard_send_finish(MigrationState *ms, PostcopyDiscardState *pds)
|
|||
|
||||
g_free(pds);
|
||||
}
|
||||
|
||||
/*
|
||||
* Current state of incoming postcopy; note this is not part of
|
||||
* MigrationIncomingState since it's state is used during cleanup
|
||||
* at the end as MIS is being freed.
|
||||
*/
|
||||
static PostcopyState incoming_postcopy_state;
|
||||
|
||||
PostcopyState postcopy_state_get(void)
|
||||
{
|
||||
return atomic_mb_read(&incoming_postcopy_state);
|
||||
}
|
||||
|
||||
/* Set the state and return the old state */
|
||||
PostcopyState postcopy_state_set(PostcopyState new_state)
|
||||
{
|
||||
return atomic_xchg(&incoming_postcopy_state, new_state);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue