mirror of
https://github.com/qemu/qemu.git
synced 2024-12-03 08:43:38 +08:00
5e5db49953
These parameters control the poll time self-tuning algorithm. They are optional and will default to sane values if omitted. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20161201192652.9509-14-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
46 lines
953 B
C
46 lines
953 B
C
/*
|
|
* Event loop thread
|
|
*
|
|
* Copyright Red Hat Inc., 2013
|
|
*
|
|
* Authors:
|
|
* Stefan Hajnoczi <stefanha@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 IOTHREAD_H
|
|
#define IOTHREAD_H
|
|
|
|
#include "block/aio.h"
|
|
#include "qemu/thread.h"
|
|
|
|
#define TYPE_IOTHREAD "iothread"
|
|
|
|
typedef struct {
|
|
Object parent_obj;
|
|
|
|
QemuThread thread;
|
|
AioContext *ctx;
|
|
QemuMutex init_done_lock;
|
|
QemuCond init_done_cond; /* is thread initialization done? */
|
|
bool stopping;
|
|
int thread_id;
|
|
|
|
/* AioContext poll parameters */
|
|
int64_t poll_max_ns;
|
|
int64_t poll_grow;
|
|
int64_t poll_shrink;
|
|
} IOThread;
|
|
|
|
#define IOTHREAD(obj) \
|
|
OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD)
|
|
|
|
char *iothread_get_id(IOThread *iothread);
|
|
AioContext *iothread_get_aio_context(IOThread *iothread);
|
|
void iothread_stop_all(void);
|
|
|
|
#endif /* IOTHREAD_H */
|