Il 03/07/2012 15:09, Kevin Wolf ha scritto: >> > Signed-off-by: MORITA Kazutaka <morita.kazut...@lab.ntt.co.jp> >> > --- >> > block/sheepdog.c | 14 ++++++++++++++ >> > 1 files changed, 14 insertions(+), 0 deletions(-) > Paolo, is this how qemu_co_recv/send are supposed to be used?
Yes. > Shouldn't > the functions take care of reentering the coroutine like the block > functions do? No, because qemu_co_recv/send are generic outside the block layer and they don't have enough context from the caller to set up the handler. For example qemu_co_send to keep the recv handler, but in turn the recv handler might have its own opaque. In fact, qemu_co_recv/send originated in sheepdog :) so they are (even with all the refactoring that went in since) Kazutaka's pet too! Paolo