migration: Add postcopy_thread_create()
commit095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4
authorPeter Xu <peterx@redhat.com>
Tue, 1 Mar 2022 08:39:06 +0000 (1 16:39 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 2 Mar 2022 18:20:45 +0000 (2 18:20 +0000)
tree8dd85c62daee6f8e4b1f71ebd85e38e05feef63c
parentcfc7dc8abfdb71e39e48bdb297b5e86fe2121d97
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>
migration/migration.h
migration/postcopy-ram.c
migration/postcopy-ram.h
migration/savevm.c