mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
migration: simplify notifiers
Pass the callback function to add_migration_state_change_notifier so that migration can initialize the notifier on add and clear it on delete, which simplifies the call sites. Shorten the function names so the extra arg can be added more legibly. Hide the global notifier list in a new function migration_call_notifiers, and make it externally visible so future live update code can call it. No functional change. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Michael Galaxy <mgalaxy@akamai.com> Reviewed-by: Michael Galaxy <mgalaxy@akamai.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <1686148954-250144-1-git-send-email-steven.sistare@oracle.com>
This commit is contained in:
parent
2c36076a11
commit
d9cda21303
6 changed files with 31 additions and 19 deletions
|
@ -60,8 +60,10 @@ void migration_object_init(void);
|
|||
void migration_shutdown(void);
|
||||
bool migration_is_idle(void);
|
||||
bool migration_is_active(MigrationState *);
|
||||
void add_migration_state_change_notifier(Notifier *notify);
|
||||
void remove_migration_state_change_notifier(Notifier *notify);
|
||||
void migration_add_notifier(Notifier *notify,
|
||||
void (*func)(Notifier *notifier, void *data));
|
||||
void migration_remove_notifier(Notifier *notify);
|
||||
void migration_call_notifiers(MigrationState *s);
|
||||
bool migration_in_setup(MigrationState *);
|
||||
bool migration_has_finished(MigrationState *);
|
||||
bool migration_has_failed(MigrationState *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue