aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-06-20 14:06:26 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-23 11:26:06 -0500
commit9e8dd45164af05a5dab00324dd10b037f5bd1e2a (patch)
tree5dad08a23d9b4661ab5f7abba83427f6fc8498d9 /migration.c
parente0e8384dd471376c3f815c3070f161480a28cc90 (diff)
downloadqemu-9e8dd45164af05a5dab00324dd10b037f5bd1e2a.zip
qemu-9e8dd45164af05a5dab00324dd10b037f5bd1e2a.tar.gz
qemu-9e8dd45164af05a5dab00324dd10b037f5bd1e2a.tar.bz2
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/migration.c b/migration.c
index af3a1f2..2a15b98 100644
--- a/migration.c
+++ b/migration.c
@@ -124,7 +124,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
}
current_migration = s;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
return 0;
}
@@ -276,7 +276,7 @@ void migrate_fd_error(FdMigrationState *s)
{
DPRINTF("setting error state\n");
s->state = MIG_STATE_ERROR;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
migrate_fd_cleanup(s);
}
@@ -334,7 +334,7 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
monitor_resume(s->mon);
}
s->state = MIG_STATE_ERROR;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
}
return ret;
@@ -395,7 +395,7 @@ void migrate_fd_put_ready(void *opaque)
state = MIG_STATE_ERROR;
}
s->state = state;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
}
}
@@ -415,7 +415,7 @@ void migrate_fd_cancel(MigrationState *mig_state)
DPRINTF("cancelling migration\n");
s->state = MIG_STATE_CANCELLED;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
qemu_savevm_state_cancel(s->mon, s->file);
migrate_fd_cleanup(s);
@@ -429,7 +429,7 @@ void migrate_fd_release(MigrationState *mig_state)
if (s->state == MIG_STATE_ACTIVE) {
s->state = MIG_STATE_CANCELLED;
- notifier_list_notify(&migration_state_notifiers);
+ notifier_list_notify(&migration_state_notifiers, NULL);
migrate_fd_cleanup(s);
}
qemu_free(s);