From 0db120afdfb818421dc5df3dc0946fafede78c93 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 18 Oct 2011 16:37:49 -0700 Subject: libcoro seems to be doing really spurious things when not using the standard functions. Switching out libcoro for the native Fibers interface for Win32. Switching out the asm version for the ucontext version for Linux. --- src/TaskMan.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/TaskMan.cc') diff --git a/src/TaskMan.cc b/src/TaskMan.cc index fc33530..0fc4668 100644 --- a/src/TaskMan.cc +++ b/src/TaskMan.cc @@ -7,7 +7,12 @@ static Balau::DefaultTmpl defaultTaskMan(50); static Balau::LocalTmpl localTaskMan; Balau::TaskMan::TaskMan() : m_stopped(false), m_allowedToSignal(false) { +#ifndef _WIN32 coro_create(&m_returnContext, 0, 0, 0, 0); +#else + m_fiber = ConvertThreadToFiber(NULL); + Assert(m_fiber); +#endif if (!localTaskMan.getGlobal()) { localTaskMan.setGlobal(this); m_loop = ev_default_loop(EVFLAG_AUTO); -- cgit v1.2.3