Re: [Qemu-block] [RFC PATCH 1/8] coroutine: Introduce qemu_coroutine_enter_if_inactive()

2016-11-17 Thread Alberto Garcia
On Thu 10 Nov 2016 06:19:02 PM CET, Kevin Wolf wrote: > diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c > index 737bffa..a06befe 100644 > --- a/util/qemu-coroutine.c > +++ b/util/qemu-coroutine.c > @@ -19,6 +19,7 @@ > #include "qemu/atomic.h" > #include "qemu/coroutine.h" > #include

[Qemu-block] [RFC PATCH 1/8] coroutine: Introduce qemu_coroutine_enter_if_inactive()

2016-11-10 Thread Kevin Wolf
In the context of asynchronous work, if we have a worker coroutine that didn't yield, the parent coroutine cannot be reentered because it hasn't yielded yet. In this case we don't even have to reenter the parent because it will see that the work is already done and won't even yield.