summaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorMarc-André Lureau2022-09-22 10:49:24 +0200
committerKevin Wolf2022-10-07 12:11:41 +0200
commitf7bbb1564d389e180c2dee7fbbad78b381e4d4ac (patch)
tree794aec8a7c5215878aa6986fa005d65a3de34f8b /tests/unit
parentmigration: add missing coroutine_fn annotations (diff)
downloadqemu-f7bbb1564d389e180c2dee7fbbad78b381e4d4ac.tar.gz
qemu-f7bbb1564d389e180c2dee7fbbad78b381e4d4ac.tar.xz
qemu-f7bbb1564d389e180c2dee7fbbad78b381e4d4ac.zip
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 <marcandre.lureau@redhat.com> Reviewed-by: Alberto Faria <afaria@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220922084924.201610-27-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test-coroutine.c2
1 files changed, 1 insertions, 1 deletions
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();
}