mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
cfc7dc8abf
commit
095c12a4a2
4 changed files with 29 additions and 18 deletions
|
@ -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! */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue