diff mbox

[03/35] test-coroutine: fix coroutine attribute

Message ID 20170704220346.29244-4-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau July 4, 2017, 10:03 p.m. UTC
CC      tests/test-coroutine.o
qemu/tests/test-coroutine.c:390:5: warning: calling function 'qemu_coroutine_yield' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis]
    qemu_coroutine_yield();
    ^
qemu/tests/test-coroutine.c:403:14: warning: Unmached attributes [-Wthread-safety-analysis]
        co = qemu_coroutine_create(perf_cost_func, &i);
             ^
2 warnings generated.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/test-coroutine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index abd97c23c1..f14277af83 100644
--- a/tests/test-coroutine.c
+++ b/tests/test-coroutine.c
@@ -385,7 +385,7 @@  static void perf_baseline(void)
         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();
 }