qemu/migration/threadinfo.h
Jiang Jiacheng 671326201d migration: Introduce interface query-migrationthreads
Introduce interface query-migrationthreads. The interface is used
to query information about migration threads and returns with
migration thread's name and its id.
Introduce threadinfo.c to manage threads with migration.

Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2023-02-06 19:22:57 +01:00

29 lines
753 B
C

/*
* Migration Threads info
*
* Copyright (c) 2022 HUAWEI TECHNOLOGIES CO., LTD.
*
* Authors:
* Jiang Jiacheng <jiangjiacheng@huawei.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include "qemu/queue.h"
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-migration.h"
typedef struct MigrationThread MigrationThread;
struct MigrationThread {
const char *name; /* the name of migration thread */
int thread_id; /* ID of the underlying host thread */
QLIST_ENTRY(MigrationThread) node;
};
MigrationThread *MigrationThreadAdd(const char *name, int thread_id);
void MigrationThreadDel(MigrationThread *info);