mirror of https://gitee.com/openkylin/libvirt.git
libxl: Rename libxlShutdownThreadInfo struct
An upcoming change will use the struct in a thread created to process death events. Rename libxlShutdownThreadInfo to libxlEventHandlerThreadInfo to reflect the more generic usage. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
23b51d7b8e
commit
a4e6fba069
|
@ -477,7 +477,7 @@ libxlDomainShutdownHandleRestart(libxlDriverPrivate *driver,
|
|||
}
|
||||
|
||||
|
||||
struct libxlShutdownThreadInfo
|
||||
struct libxlEventHandlerThreadInfo
|
||||
{
|
||||
libxlDriverPrivate *driver;
|
||||
virDomainObj *vm;
|
||||
|
@ -488,7 +488,7 @@ struct libxlShutdownThreadInfo
|
|||
static void
|
||||
libxlDomainShutdownThread(void *opaque)
|
||||
{
|
||||
struct libxlShutdownThreadInfo *shutdown_info = opaque;
|
||||
struct libxlEventHandlerThreadInfo *shutdown_info = opaque;
|
||||
virDomainObj *vm = shutdown_info->vm;
|
||||
libxl_event *ev = shutdown_info->event;
|
||||
libxlDriverPrivate *driver = shutdown_info->driver;
|
||||
|
@ -665,7 +665,7 @@ libxlDomainEventHandler(void *data, libxl_event *event)
|
|||
}
|
||||
|
||||
if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) {
|
||||
struct libxlShutdownThreadInfo *shutdown_info = NULL;
|
||||
struct libxlEventHandlerThreadInfo *shutdown_info = NULL;
|
||||
virThread thread;
|
||||
g_autofree char *name = NULL;
|
||||
|
||||
|
@ -673,7 +673,7 @@ libxlDomainEventHandler(void *data, libxl_event *event)
|
|||
* Start a thread to handle shutdown. We don't want to be tying up
|
||||
* libxl's event machinery by doing a potentially lengthy shutdown.
|
||||
*/
|
||||
shutdown_info = g_new0(struct libxlShutdownThreadInfo, 1);
|
||||
shutdown_info = g_new0(struct libxlEventHandlerThreadInfo, 1);
|
||||
|
||||
shutdown_info->driver = driver;
|
||||
shutdown_info->vm = vm;
|
||||
|
@ -693,7 +693,7 @@ libxlDomainEventHandler(void *data, libxl_event *event)
|
|||
}
|
||||
/*
|
||||
* virDomainObjEndAPI is called in the shutdown thread, where
|
||||
* libxlShutdownThreadInfo and libxl_event are also freed.
|
||||
* libxlEventHandlerThreadInfo and libxl_event are also freed.
|
||||
*/
|
||||
return;
|
||||
} else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) {
|
||||
|
|
Loading…
Reference in New Issue