aboutsummaryrefslogtreecommitdiff
path: root/migration/postcopy-ram.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2022-03-01 16:39:06 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2022-03-02 18:20:45 +0000
commit095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4 (patch)
tree8dd85c62daee6f8e4b1f71ebd85e38e05feef63c /migration/postcopy-ram.h
parentcfc7dc8abfdb71e39e48bdb297b5e86fe2121d97 (diff)
downloadqemu-095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4.zip
qemu-095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4.tar.gz
qemu-095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4.tar.bz2
migration: Add postcopy_thread_create()
Postcopy create threads. A common manner is we init a sem and use it to sync with the thread. Namely, we have fault_thread_sem and listen_thread_sem and they're only used for this. Make it a shared infrastructure so it's easier to create yet another thread. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20220301083925.33483-7-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/postcopy-ram.h')
-rw-r--r--migration/postcopy-ram.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
index 6d2b3cf..07684c0 100644
--- a/migration/postcopy-ram.h
+++ b/migration/postcopy-ram.h
@@ -135,6 +135,10 @@ void postcopy_remove_notifier(NotifierWithReturn *n);
/* Call the notifier list set by postcopy_add_start_notifier */
int postcopy_notify(enum PostcopyNotifyReason reason, Error **errp);
+void postcopy_thread_create(MigrationIncomingState *mis,
+ QemuThread *thread, const char *name,
+ void *(*fn)(void *), int joinable);
+
struct PostCopyFD;
/* ufd is a pointer to the struct uffd_msg *TODO: more Portable! */