Message ID | 523AFE5F.9080808@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/coroutine-win32.c b/coroutine-win32.c index edc1f72..3b10189 100644 --- a/coroutine-win32.c +++ b/coroutine-win32.c @@ -55,7 +55,13 @@ static void CALLBACK coroutine_trampoline(void *co_) while (true) { co->entry(co->entry_arg); - qemu_coroutine_switch(co, co->caller, COROUTINE_TERMINATE); + Coroutine *to_ = co->caller; + CoroutineWin32 *from = DO_UPCAST(CoroutineWin32, base, co); + CoroutineWin32 *to = DO_UPCAST(CoroutineWin32, base, to_); + + current = to_; + to->action = COROUTINE_TERMINATE; + SwitchToFiber(to->fiber); } }