[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 15/34] test-coroutine: prepare for the next patch
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL v2 15/34] test-coroutine: prepare for the next patch |
Date: |
Wed, 13 Jul 2016 14:50:22 +0200 |
From: Paolo Bonzini <address@hidden>
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 <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/test-coroutine.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index 215b92e..5171174 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);
}
/*
--
1.8.3.1
- [Qemu-devel] [PULL v2 04/34] block: Use block_job_get() in find_block_job(), (continued)
- [Qemu-devel] [PULL v2 04/34] block: Use block_job_get() in find_block_job(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 01/34] stream: Fix prototype of stream_start(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 06/34] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 07/34] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 08/34] stream: Add 'job-id' parameter to 'block-stream', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 10/34] qemu-img: Set the ID of the block job in img_commit(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 05/34] blockjob: Add 'job_id' parameter to block_job_create(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 13/34] raw-posix: Use qemu_dup, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 11/34] blockjob: Update description of the 'device' field in the QMP API, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 12/34] osdep: Introduce qemu_dup, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 15/34] test-coroutine: prepare for the next patch,
Kevin Wolf <=
- [Qemu-devel] [PULL v2 09/34] commit: Add 'job-id' parameter to 'block-commit', Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 17/34] block/qdev: Allow node name for drive properties, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 19/34] commit: Fix use of error handling policy, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 14/34] coroutine: use QSIMPLEQ instead of QTAILQ, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 18/34] block/qdev: Allow configuring WCE with qdev properties, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 20/34] block/qdev: Allow configuring rerror/werror with qdev properties, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 16/34] coroutine: move entry argument to qemu_coroutine_create, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 25/34] qemu-io: Use correct range limitations, Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 26/34] qcow2: Fix qcow2_get_cluster_offset(), Kevin Wolf, 2016/07/13
- [Qemu-devel] [PULL v2 24/34] qcow2: Avoid making the L1 table too big, Kevin Wolf, 2016/07/13