On 2018-08-13 14:54, Murilo Opsfelder Araujo wrote: > Hi, Max. Hi, Murilo!
> On Mon, Aug 13, 2018 at 04:19:51AM +0200, Max Reitz wrote: >> mirror_wait_for_any_operation() calls qemu_co_queue_wait(), which is a >> coroutine_fn (technically it is a macro which resolves to a >> coroutine_fn). Therefore, this function needs to be a coroutine_fn as >> well. >> >> This patch makes it and all of its callers coroutine_fns. >> >> Signed-off-by: Max Reitz <mre...@redhat.com> >> --- >> block/mirror.c | 30 ++++++++++++++++-------------- >> 1 file changed, 16 insertions(+), 14 deletions(-) >> >> diff --git a/block/mirror.c b/block/mirror.c >> index 85f5742eae..c28b6159d5 100644 >> --- a/block/mirror.c >> +++ b/block/mirror.c [...] >> @@ -1098,11 +1100,11 @@ static void mirror_complete(Job *job, Error **errp) >> job_enter(job); >> } >> >> -static void mirror_pause(Job *job) >> +static void coroutine_fn mirror_pause(Job *job) > > Other functions in this patch were renamed to mirror_co_*. I'm not sure if > mirror_pause() should follow that, i.e. be renamed to mirror_co_pause(). Hm. I don't know why I didn't do that. Makes sense, why not. (Well, JobDriver.pause() is not called .co_pause(), but then again, JobDriver.start is set to mirror_run(), so it's not like our function names match so far...) Max
signature.asc
Description: OpenPGP digital signature