From: Marc-André Lureau Date: Thu, 22 Sep 2022 08:49:24 +0000 (+0200) Subject: test-coroutine: add missing coroutine_fn annotations X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f7bbb1564d389e180c2dee7fbbad78b381e4d4ac;p=qemu.git test-coroutine: 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. Signed-off-by: Marc-André Lureau Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20220922084924.201610-27-pbonzini@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index aa77a3bcb3..e16b80c245 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -610,7 +610,7 @@ static void perf_baseline(void) g_test_message("Function call %u iterations: %f s", maxcycles, duration); } -static __attribute__((noinline)) void perf_cost_func(void *opaque) +static __attribute__((noinline)) void coroutine_fn perf_cost_func(void *opaque) { qemu_coroutine_yield(); }