On 11/14/2011 04:04 AM, Zhi Yong Wu wrote:
> + co = qemu_coroutine_create(bdrv_is_allocated_co_entry); > + qemu_coroutine_enter(co,&data);Since this main process will stop within qemu_coroutine_enter() until bdrv_is_allocated_co_entry() is completed, three lines of condition codes below are unnecessary, right?
No, they are necessary. They are executed when bdrv_is_allocated_co_entry calls qemu_coroutine_yield.
> + while (!data.done) { > + qemu_aio_wait(); > + }
Paolo