Lines Matching +full:- +full:- +full:with +full:- +full:coroutine
10 * See the COPYING.LIB file in the top-level directory.
15 #include "qemu/coroutine.h"
17 #include "qemu/error-report.h"
26 static __thread int id = -1;
41 data->cb(data->arg); in ctx_run_bh_cb()
109 static Coroutine *to_schedule[NUM_CONTEXTS];
118 Coroutine *co; in schedule_next()
173 Coroutine *co1 = qemu_coroutine_create(test_multi_co_schedule_entry, NULL); in test_multi_co_schedule()
201 /* CoMutex thread-safety. */
218 * exits before the coroutine is woken up, causing a spurious in test_multi_co_mutex_entry()
239 Coroutine *co1 = qemu_coroutine_create(test_multi_co_mutex_entry, NULL); in test_multi_co_mutex()
255 /* Testing with NUM_CONTEXTS threads focuses on the queue. The mutex however
269 /* Testing with fewer threads stresses the handoff protocol too. Still, the
284 /* Same test with fair mutexes, for performance comparison. */
297 static int mutex_head = -1;
303 nodes[id].next = -1; in mcs_mutex_lock()
306 if (prev != -1) { in mcs_mutex_lock()
317 if (qatomic_read(&nodes[id].next) == -1) { in mcs_mutex_unlock()
319 qatomic_cmpxchg(&mutex_head, id, -1) == id) { in mcs_mutex_unlock()
323 while (qatomic_read(&nodes[id].next) == -1) { in mcs_mutex_unlock()
351 assert(mutex_head == -1); in test_multi_fair_mutex()
360 Coroutine *co1 = qemu_coroutine_create(test_multi_fair_mutex_entry, NULL); in test_multi_fair_mutex()
387 /* Same test with pthread mutexes, for performance comparison and
416 Coroutine *co1 = qemu_coroutine_create(test_multi_mutex_entry, NULL); in test_multi_mutex()