Revision dcc772e2 include/block/aio.h
b/include/block/aio.h | ||
---|---|---|
17 | 17 |
#include "qemu-common.h" |
18 | 18 |
#include "qemu/queue.h" |
19 | 19 |
#include "qemu/event_notifier.h" |
20 |
#include "qemu/thread.h" |
|
20 | 21 |
|
21 | 22 |
typedef struct BlockDriverAIOCB BlockDriverAIOCB; |
22 | 23 |
typedef void BlockDriverCompletionFunc(void *opaque, int ret); |
... | ... | |
53 | 54 |
*/ |
54 | 55 |
int walking_handlers; |
55 | 56 |
|
57 |
/* lock to protect between bh's adders and deleter */ |
|
58 |
QemuMutex bh_lock; |
|
56 | 59 |
/* Anchor of the list of Bottom Halves belonging to the context */ |
57 | 60 |
struct QEMUBH *first_bh; |
58 | 61 |
|
... | ... | |
127 | 130 |
* aio_bh_poll: Poll bottom halves for an AioContext. |
128 | 131 |
* |
129 | 132 |
* These are internal functions used by the QEMU main loop. |
133 |
* And notice that multiple occurrences of aio_bh_poll cannot |
|
134 |
* be called concurrently |
|
130 | 135 |
*/ |
131 | 136 |
int aio_bh_poll(AioContext *ctx); |
132 | 137 |
|
... | ... | |
163 | 168 |
* Deleting a bottom half frees the memory that was allocated for it by |
164 | 169 |
* qemu_bh_new. It also implies canceling the bottom half if it was |
165 | 170 |
* scheduled. |
171 |
* This func is async. The bottom half will do the delete action at the finial |
|
172 |
* end. |
|
166 | 173 |
* |
167 | 174 |
* @bh: The bottom half to be deleted. |
168 | 175 |
*/ |
Also available in: Unified diff