Commit 6eb5733a3cad93b00043d48fa22b9df7d1f5ab33
1 parent
15e6690a
fixed blocking io emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2090 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
11 additions
and
2 deletions
block-raw.c
vl.c
... | ... | @@ -5200,19 +5200,23 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque) |
5200 | 5200 | return bh; |
5201 | 5201 | } |
5202 | 5202 | |
5203 | -void qemu_bh_poll(void) | |
5203 | +int qemu_bh_poll(void) | |
5204 | 5204 | { |
5205 | 5205 | QEMUBH *bh, **pbh; |
5206 | + int ret; | |
5206 | 5207 | |
5208 | + ret = 0; | |
5207 | 5209 | for(;;) { |
5208 | 5210 | pbh = &first_bh; |
5209 | 5211 | bh = *pbh; |
5210 | 5212 | if (!bh) |
5211 | 5213 | break; |
5214 | + ret = 1; | |
5212 | 5215 | *pbh = bh->next; |
5213 | 5216 | bh->scheduled = 0; |
5214 | 5217 | bh->cb(bh->opaque); |
5215 | 5218 | } |
5219 | + return ret; | |
5216 | 5220 | } |
5217 | 5221 | |
5218 | 5222 | void qemu_bh_schedule(QEMUBH *bh) | ... | ... |
vl.h
... | ... | @@ -495,7 +495,7 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); |
495 | 495 | void qemu_bh_schedule(QEMUBH *bh); |
496 | 496 | void qemu_bh_cancel(QEMUBH *bh); |
497 | 497 | void qemu_bh_delete(QEMUBH *bh); |
498 | -void qemu_bh_poll(void); | |
498 | +int qemu_bh_poll(void); | |
499 | 499 | |
500 | 500 | /* block.c */ |
501 | 501 | typedef struct BlockDriverState BlockDriverState; | ... | ... |