On 19/12/18 11:05, Li Qiang wrote:
> Sent it to qemu-devel.
> 
> Li Qiang <liq...@gmail.com <mailto:liq...@gmail.com>> 于2018年12月19日周
> 三 下午6:04写道:
> 
>     Hello Paolo, Stefan, Fam and all,
> 
>     Here I have a question about 'aio_poll'.
>     IIUC the 'aio_poll' is (mostly) used for synchronous IO
>     as I see a lot of code like this: 
>     while(condition)
>      aio_poll();
> 
>     However it seems the 'aio_poll' and 'aio_ctx_dispatch' both poll the fd.
>     So what happened when the 'fd' has events, which function will be
>     wakeup?

Roughly speaking, aio_poll is used for synchronous IO and within I/O
threads; aio_ctx_dispatch is used within the main thread.

Both end up calling aio_dispatch_handlers and timerlistgroup_run_timers.

Paolo

Reply via email to