]> git.proxmox.com Git - mirror_qemu.git/blob - include/sysemu/event-loop-base.h
2748bf6ae1f827db44793c3e62e826a5b67b85ae
[mirror_qemu.git] / include / sysemu / event-loop-base.h
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
15 #include "qom/object.h"
16 #include "block/aio.h"
17 #include "qemu/typedefs.h"
18
19 #define TYPE_EVENT_LOOP_BASE "event-loop-base"
20 OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,
21 EVENT_LOOP_BASE)
22
23 struct EventLoopBaseClass {
24 ObjectClass parent_class;
25
26 void (*init)(EventLoopBase *base, Error **errp);
27 void (*update_params)(EventLoopBase *base, Error **errp);
28 bool (*can_be_deleted)(EventLoopBase *base);
29 };
30
31 struct EventLoopBase {
32 Object parent;
33
34 /* AioContext AIO engine parameters */
35 int64_t aio_max_batch;
36
37 /* AioContext thread pool parameters */
38 int64_t thread_pool_min;
39 int64_t thread_pool_max;
40 };
41 #endif