threadinfo.h 753 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Migration Threads info
  3. *
  4. * Copyright (c) 2022 HUAWEI TECHNOLOGIES CO., LTD.
  5. *
  6. * Authors:
  7. * Jiang Jiacheng <jiangjiacheng@huawei.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2 or later.
  10. * See the COPYING file in the top-level directory.
  11. */
  12. #include "qemu/queue.h"
  13. #include "qemu/osdep.h"
  14. #include "qapi/error.h"
  15. #include "qapi/qapi-commands-migration.h"
  16. typedef struct MigrationThread MigrationThread;
  17. struct MigrationThread {
  18. const char *name; /* the name of migration thread */
  19. int thread_id; /* ID of the underlying host thread */
  20. QLIST_ENTRY(MigrationThread) node;
  21. };
  22. MigrationThread *MigrationThreadAdd(const char *name, int thread_id);
  23. void MigrationThreadDel(MigrationThread *info);