mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
fixed blocking io emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2090 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
15e6690aca
commit
6eb5733a3c
3 changed files with 11 additions and 2 deletions
6
vl.c
6
vl.c
|
@ -5200,19 +5200,23 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
|
|||
return bh;
|
||||
}
|
||||
|
||||
void qemu_bh_poll(void)
|
||||
int qemu_bh_poll(void)
|
||||
{
|
||||
QEMUBH *bh, **pbh;
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
for(;;) {
|
||||
pbh = &first_bh;
|
||||
bh = *pbh;
|
||||
if (!bh)
|
||||
break;
|
||||
ret = 1;
|
||||
*pbh = bh->next;
|
||||
bh->scheduled = 0;
|
||||
bh->cb(bh->opaque);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void qemu_bh_schedule(QEMUBH *bh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue