Lines Matching +full:- +full:- +full:with +full:- +full:coroutine
2 * Coroutine tests
10 * See the COPYING.LIB file in the top-level directory.
28 Coroutine *coroutine; in test_in_coroutine() local
32 coroutine = qemu_coroutine_create(verify_in_coroutine, NULL); in test_in_coroutine()
33 qemu_coroutine_enter(coroutine); in test_in_coroutine()
42 Coroutine **p_co = opaque; in verify_self()
48 Coroutine *coroutine; in test_self() local
50 coroutine = qemu_coroutine_create(verify_self, &coroutine); in test_self()
51 qemu_coroutine_enter(coroutine); in test_self()
60 Coroutine *caller = (Coroutine *)opaque; in verify_entered_step_2()
73 Coroutine *self = qemu_coroutine_self(); in verify_entered_step_1()
74 Coroutine *coroutine; in verify_entered_step_1() local
78 coroutine = qemu_coroutine_create(verify_entered_step_2, self); in verify_entered_step_1()
79 g_assert(!qemu_coroutine_entered(coroutine)); in verify_entered_step_1()
80 qemu_coroutine_enter(coroutine); in verify_entered_step_1()
81 g_assert(!qemu_coroutine_entered(coroutine)); in verify_entered_step_1()
82 qemu_coroutine_enter(coroutine); in verify_entered_step_1()
87 Coroutine *coroutine; in test_entered() local
89 coroutine = qemu_coroutine_create(verify_entered_step_1, NULL); in test_entered()
90 g_assert(!qemu_coroutine_entered(coroutine)); in test_entered()
91 qemu_coroutine_enter(coroutine); in test_entered()
108 nd->n_enter++; in nest()
110 if (nd->n_enter < nd->max) { in nest()
111 Coroutine *child; in nest()
117 nd->n_return++; in nest()
122 Coroutine *root; in test_nesting()
154 Coroutine *coroutine; in test_yield() local
156 int i = -1; /* one extra time to return from coroutine */ in test_yield()
158 coroutine = qemu_coroutine_create(yield_5_times, &done); in test_yield()
160 qemu_coroutine_enter(coroutine); in test_yield()
163 g_assert_cmpint(i, ==, 5); /* coroutine must yield 5 times */ in test_yield()
173 Coroutine *c2 = opaque; in c1_fn()
179 Coroutine *c1; in test_no_dangling_access()
180 Coroutine *c2; in test_no_dangling_access()
181 Coroutine tmp; in test_no_dangling_access()
190 memset(c1, 0xff, sizeof(Coroutine)); in test_no_dangling_access()
193 /* Must restore the coroutine now to avoid corrupted pool */ in test_no_dangling_access()
226 Coroutine *c1 = qemu_coroutine_create(entry, opaque); in do_test_co_mutex()
227 Coroutine *c2 = qemu_coroutine_create(entry, opaque); in do_test_co_mutex()
272 * |--------------+------------+
308 Coroutine *c1, *c2; in test_co_rwlock_upgrade()
363 * Check that downgrading a reader-writer lock does not cause a hang.
373 * |--------+------------+------------+------------|
399 Coroutine *c1, *c2, *c3, *c4; in test_co_rwlock_downgrade()
437 Coroutine *coroutine; in test_lifecycle() local
440 /* Create, enter, and return from coroutine */ in test_lifecycle()
441 coroutine = qemu_coroutine_create(set_and_exit, &done); in test_lifecycle()
442 qemu_coroutine_enter(coroutine); in test_lifecycle()
447 coroutine = qemu_coroutine_create(set_and_exit, &done); in test_lifecycle()
448 qemu_coroutine_enter(coroutine); in test_lifecycle()
465 cp->func = func; in record_push()
466 cp->state = state; in record_push()
480 Coroutine *co; in do_order_test()
516 Coroutine *coroutine; in perf_lifecycle() local
524 coroutine = qemu_coroutine_create(empty_coroutine, NULL); in perf_lifecycle()
525 qemu_coroutine_enter(coroutine); in perf_lifecycle()
539 Coroutine *root; in perf_nesting()
566 (*counter)--; in yield_loop()
578 Coroutine *coroutine = qemu_coroutine_create(yield_loop, &i); in perf_yield() local
582 qemu_coroutine_enter(coroutine); in perf_yield()
591 (*i)--; in dummy()
622 Coroutine *co; in perf_cost()
634 "%luns per coroutine", in perf_cost()
644 /* This test assumes there is a freelist and marks freed coroutine memory in main()
645 * with a sentinel value. If there is no freelist this would legitimately in main()
649 g_test_add_func("/basic/no-dangling-access", test_no_dangling_access); in main()
659 g_test_add_func("/locking/co-mutex", test_co_mutex); in main()
660 g_test_add_func("/locking/co-mutex/lockable", test_co_mutex_lockable); in main()
661 g_test_add_func("/locking/co-rwlock/upgrade", test_co_rwlock_upgrade); in main()
662 g_test_add_func("/locking/co-rwlock/downgrade", test_co_rwlock_downgrade); in main()
667 g_test_add_func("/perf/function-call", perf_baseline); in main()