Nicolas Saenz Julienne | 7d5983e | 2022-04-25 09:57:21 +0200 | [diff] [blame] | 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" |
Nicolas Saenz Julienne | 7d5983e | 2022-04-25 09:57:21 +0200 | [diff] [blame] | 17 | |
| 18 | #define TYPE_EVENT_LOOP_BASE "event-loop-base" |
| 19 | OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass, |
| 20 | EVENT_LOOP_BASE) |
| 21 | |
| 22 | struct EventLoopBaseClass { |
| 23 | ObjectClass parent_class; |
| 24 | |
| 25 | void (*init)(EventLoopBase *base, Error **errp); |
| 26 | void (*update_params)(EventLoopBase *base, Error **errp); |
Nicolas Saenz Julienne | 70ac26b | 2022-04-25 09:57:22 +0200 | [diff] [blame] | 27 | bool (*can_be_deleted)(EventLoopBase *base); |
Nicolas Saenz Julienne | 7d5983e | 2022-04-25 09:57:21 +0200 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | struct EventLoopBase { |
| 31 | Object parent; |
| 32 | |
| 33 | /* AioContext AIO engine parameters */ |
| 34 | int64_t aio_max_batch; |
Nicolas Saenz Julienne | 71ad471 | 2022-04-25 09:57:23 +0200 | [diff] [blame] | 35 | |
| 36 | /* AioContext thread pool parameters */ |
| 37 | int64_t thread_pool_min; |
| 38 | int64_t thread_pool_max; |
Nicolas Saenz Julienne | 7d5983e | 2022-04-25 09:57:21 +0200 | [diff] [blame] | 39 | }; |
| 40 | #endif |