From: Paolo Bonzini Date: Thu, 22 Sep 2022 08:49:19 +0000 (+0200) Subject: job: add missing coroutine_fn annotations X-Git-Tag: v7.2.0-rc0~57^2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06753a0750a1973983505c2b544445042f555ba6;p=thirdparty%2Fqemu.git job: add missing coroutine_fn annotations Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20220922084924.201610-22-pbonzini@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- diff --git a/include/qemu/job.h b/include/qemu/job.h index c105b31076c..397ac396083 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -436,7 +436,7 @@ void coroutine_fn job_pause_point(Job *job); * * Yield the job coroutine. */ -void job_yield(Job *job); +void coroutine_fn job_yield(Job *job); /** * @job: The job that calls the function. diff --git a/job.c b/job.c index 075c6f3a202..20f0d8b2cd5 100644 --- a/job.c +++ b/job.c @@ -525,7 +525,7 @@ void coroutine_fn job_pause_point(Job *job) } } -void job_yield(Job *job) +void coroutine_fn job_yield(Job *job) { assert(job->busy);