case COROUTINE_YIELD:
return;
case COROUTINE_TERMINATE:
+ assert(!co->locks_held);
trace_qemu_coroutine_terminate(co);
coroutine_delete(co);
return;
self->caller = NULL;
qemu_coroutine_switch(self, to, COROUTINE_YIELD);
}
+
+bool qemu_coroutine_entered(Coroutine *co)
+{
+ return co->caller;
+}