xref: /qemu/tests/unit/iothread.h (revision da668aa1)
1*da668aa1SThomas Huth /*
2*da668aa1SThomas Huth  * Event loop thread implementation for unit tests
3*da668aa1SThomas Huth  *
4*da668aa1SThomas Huth  * Copyright Red Hat Inc., 2013, 2016
5*da668aa1SThomas Huth  *
6*da668aa1SThomas Huth  * Authors:
7*da668aa1SThomas Huth  *  Stefan Hajnoczi   <stefanha@redhat.com>
8*da668aa1SThomas Huth  *  Paolo Bonzini     <pbonzini@redhat.com>
9*da668aa1SThomas Huth  *
10*da668aa1SThomas Huth  * This work is licensed under the terms of the GNU GPL, version 2 or later.
11*da668aa1SThomas Huth  * See the COPYING file in the top-level directory.
12*da668aa1SThomas Huth  */
13*da668aa1SThomas Huth #ifndef TEST_IOTHREAD_H
14*da668aa1SThomas Huth #define TEST_IOTHREAD_H
15*da668aa1SThomas Huth 
16*da668aa1SThomas Huth #include "block/aio.h"
17*da668aa1SThomas Huth #include "qemu/thread.h"
18*da668aa1SThomas Huth 
19*da668aa1SThomas Huth typedef struct IOThread IOThread;
20*da668aa1SThomas Huth 
21*da668aa1SThomas Huth IOThread *iothread_new(void);
22*da668aa1SThomas Huth void iothread_join(IOThread *iothread);
23*da668aa1SThomas Huth AioContext *iothread_get_aio_context(IOThread *iothread);
24*da668aa1SThomas Huth 
25*da668aa1SThomas Huth #endif
26