diff options
author | Stefan Hajnoczi | 2017-12-06 15:45:48 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2017-12-19 11:25:09 +0100 |
commit | fbcc6923b00c2b468a7470fec7863f0403a65736 (patch) | |
tree | 665c5283371b8fc24fd9ad5d4d9b413b901f77e8 /include | |
parent | block: drop unused BlockDirtyBitmapState->aio_context field (diff) | |
download | qemu-fbcc6923b00c2b468a7470fec7863f0403a65736.tar.gz qemu-fbcc6923b00c2b468a7470fec7863f0403a65736.tar.xz qemu-fbcc6923b00c2b468a7470fec7863f0403a65736.zip |
iothread: add iothread_by_id() API
Encapsulate IOThread QOM object lookup so that callers don't need to
know how and where IOThread objects live.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20171206144550.22295-8-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/iothread.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index 110329b2b4..55de1715c7 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -42,6 +42,7 @@ typedef struct { 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); void iothread_stop_all(void); GMainContext *iothread_get_g_main_context(IOThread *iothread); |