diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-04 19:10:00 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-07-13 13:26:02 +0200 |
commit | 7e70cdba9f220bef3f3481c663c066c2b80469aa (patch) | |
tree | 7526a6caa39004de6e7fc9d12fb4d1f4d33d4b56 | |
parent | 7d9c8581370738fb3877a724ac061e6a8cd00121 (diff) |
test-coroutine: prepare for the next patch
The next patch moves the coroutine argument from first-enter to
creation time. In this case, coroutine has not been initialized
yet when the coroutine is created, so change to a pointer.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | tests/test-coroutine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c index 215b92e636..51711744c8 100644 --- a/tests/test-coroutine.c +++ b/tests/test-coroutine.c @@ -40,7 +40,8 @@ static void test_in_coroutine(void) static void coroutine_fn verify_self(void *opaque) { - g_assert(qemu_coroutine_self() == opaque); + Coroutine **p_co = opaque; + g_assert(qemu_coroutine_self() == *p_co); } static void test_self(void) @@ -48,7 +49,7 @@ static void test_self(void) Coroutine *coroutine; coroutine = qemu_coroutine_create(verify_self); - qemu_coroutine_enter(coroutine, coroutine); + qemu_coroutine_enter(coroutine, &coroutine); } /* |