| * Copyright Red Hat Inc., 2013 |
| * 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. |
| #define TYPE_IOTHREAD "iothread" |
| GMainContext *worker_context; |
| QemuMutex init_done_lock; |
| QemuCond init_done_cond; /* is thread initialization done? */ |
| bool stopping; /* has iothread_stop() been called? */ |
| bool running; /* should iothread_run() continue? */ |
| /* AioContext poll parameters */ |
| OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD) |
| char *iothread_get_id(IOThread *iothread); |
| IOThread *iothread_by_id(const char *id); |
| AioContext *iothread_get_aio_context(IOThread *iothread); |
| GMainContext *iothread_get_g_main_context(IOThread *iothread); |
| * Helpers used to allocate iothreads for internal use. These |
| * iothreads will not be seen by monitor clients when query using |
| IOThread *iothread_create(const char *id, Error **errp); |
| void iothread_stop(IOThread *iothread); |
| void iothread_destroy(IOThread *iothread); |