2
0

event-loop-base.h 979 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * QEMU event-loop backend
  3. *
  4. * Copyright (C) 2022 Red Hat Inc
  5. *
  6. * Authors:
  7. * Nicolas Saenz Julienne <nsaenzju@redhat.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. #ifndef QEMU_EVENT_LOOP_BASE_H
  13. #define QEMU_EVENT_LOOP_BASE_H
  14. #include "qom/object.h"
  15. #include "block/aio.h"
  16. #define TYPE_EVENT_LOOP_BASE "event-loop-base"
  17. OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,
  18. EVENT_LOOP_BASE)
  19. struct EventLoopBaseClass {
  20. ObjectClass parent_class;
  21. void (*init)(EventLoopBase *base, Error **errp);
  22. void (*update_params)(EventLoopBase *base, Error **errp);
  23. bool (*can_be_deleted)(EventLoopBase *base);
  24. };
  25. struct EventLoopBase {
  26. Object parent;
  27. /* AioContext AIO engine parameters */
  28. int64_t aio_max_batch;
  29. /* AioContext thread pool parameters */
  30. int64_t thread_pool_min;
  31. int64_t thread_pool_max;
  32. };
  33. #endif