2022-04-25 10:57:21 +03:00
|
|
|
/*
|
|
|
|
* QEMU event-loop backend
|
|
|
|
*
|
|
|
|
* Copyright (C) 2022 Red Hat Inc
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Nicolas Saenz Julienne <nsaenzju@redhat.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.
|
|
|
|
*/
|
|
|
|
#ifndef QEMU_EVENT_LOOP_BASE_H
|
|
|
|
#define QEMU_EVENT_LOOP_BASE_H
|
|
|
|
|
|
|
|
#include "qom/object.h"
|
|
|
|
#include "block/aio.h"
|
|
|
|
|
|
|
|
#define TYPE_EVENT_LOOP_BASE "event-loop-base"
|
|
|
|
OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,
|
|
|
|
EVENT_LOOP_BASE)
|
|
|
|
|
|
|
|
struct EventLoopBaseClass {
|
|
|
|
ObjectClass parent_class;
|
|
|
|
|
|
|
|
void (*init)(EventLoopBase *base, Error **errp);
|
|
|
|
void (*update_params)(EventLoopBase *base, Error **errp);
|
2022-04-25 10:57:22 +03:00
|
|
|
bool (*can_be_deleted)(EventLoopBase *base);
|
2022-04-25 10:57:21 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct EventLoopBase {
|
|
|
|
Object parent;
|
|
|
|
|
|
|
|
/* AioContext AIO engine parameters */
|
|
|
|
int64_t aio_max_batch;
|
2022-04-25 10:57:23 +03:00
|
|
|
|
|
|
|
/* AioContext thread pool parameters */
|
|
|
|
int64_t thread_pool_min;
|
|
|
|
int64_t thread_pool_max;
|
2022-04-25 10:57:21 +03:00
|
|
|
};
|
|
|
|
#endif
|