[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/35] /basic/nesting
From: |
Paolo Bonzini |
Subject: |
[PATCH 14/35] /basic/nesting |
Date: |
Thu, 10 Mar 2022 13:43:52 +0100 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/unit/test-coroutine.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index ae06e97c95..7aaadfd31a 100644
--- a/tests/unit/test-coroutine.c
+++ b/tests/unit/test-coroutine.c
@@ -93,6 +93,7 @@ static void test_entered(void)
g_assert(!qemu_coroutine_entered(coroutine));
qemu_coroutine_enter(coroutine);
}
+#endif
/*
* Check that coroutines may nest multiple levels
@@ -104,7 +105,7 @@ typedef struct {
unsigned int max; /* maximum level of nesting */
} NestData;
-static void coroutine_fn nest(void *opaque)
+static CoroutineAction nest(void *opaque)
{
NestData *nd = opaque;
@@ -118,6 +119,7 @@ static void coroutine_fn nest(void *opaque)
}
nd->n_return++;
+ return COROUTINE_CONTINUE;
}
static void test_nesting(void)
@@ -141,7 +143,6 @@ static void test_nesting(void)
* Check that yield/enter transfer control correctly
*/
-#endif
CO_DECLARE_FRAME(yield_5_times, void *opaque, int i);
static CoroutineAction co__yield_5_times(void *_frame)
{
@@ -679,8 +680,8 @@ int main(int argc, char **argv)
g_test_add_func("/basic/lifecycle", test_lifecycle);
g_test_add_func("/basic/yield", test_yield);
-#if 0
g_test_add_func("/basic/nesting", test_nesting);
+#if 0
g_test_add_func("/basic/self", test_self);
g_test_add_func("/basic/entered", test_entered);
g_test_add_func("/basic/in_coroutine", test_in_coroutine);
--
2.35.1
- [PATCH experiment 00/35] stackless coroutine backend, Paolo Bonzini, 2022/03/10
- [PATCH 02/35] coroutine: qemu_coroutine_get_aio_context is not a coroutine_fn, Paolo Bonzini, 2022/03/10
- [PATCH 05/35] coroutine: small code cleanup in qemu_co_rwlock_wrlock, Paolo Bonzini, 2022/03/10
- [PATCH 08/35] /basic/lifecycle, Paolo Bonzini, 2022/03/10
- [PATCH 01/35] coroutine: add missing coroutine_fn annotations for CoRwlock functions, Paolo Bonzini, 2022/03/10
- [PATCH 09/35] convert qemu-coroutine-sleep.c to stackless coroutines, Paolo Bonzini, 2022/03/10
- [PATCH 14/35] /basic/nesting,
Paolo Bonzini <=
- [PATCH 03/35] coroutine: introduce QemuCoLockable, Paolo Bonzini, 2022/03/10
- [PATCH 07/35] coroutine: introduce the "stackless coroutine" backend, Paolo Bonzini, 2022/03/10
- [PATCH 16/35] /basic/entered, Paolo Bonzini, 2022/03/10
- [PATCH 17/35] /basic/in_coroutine, Paolo Bonzini, 2022/03/10
- [PATCH 04/35] coroutine: introduce coroutine_only_fn, Paolo Bonzini, 2022/03/10
- [PATCH 06/35] disable some code, Paolo Bonzini, 2022/03/10
- [PATCH 21/35] /perf/yield, Paolo Bonzini, 2022/03/10
- [PATCH 26/35] convert qemu_co_mutex_lock_slowpath to magic macros, Paolo Bonzini, 2022/03/10
- [PATCH 11/35] convert CoMutex to stackless coroutines, Paolo Bonzini, 2022/03/10
- [PATCH 13/35] /basic/yield, Paolo Bonzini, 2022/03/10