mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration: migration_thread_is_self
Define and export migration_thread_is_self to eliminate a dependency on MigrationState. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
714f33123b
commit
6e78563976
3 changed files with 9 additions and 4 deletions
|
@ -1647,6 +1647,13 @@ bool migration_is_active(void)
|
|||
s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
|
||||
}
|
||||
|
||||
bool migration_thread_is_self(void)
|
||||
{
|
||||
MigrationState *s = current_migration;
|
||||
|
||||
return qemu_thread_is_self(&s->thread);
|
||||
}
|
||||
|
||||
bool migrate_mode_is_cpr(MigrationState *s)
|
||||
{
|
||||
return s->parameters.mode == MIG_MODE_CPR_REBOOT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue