diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-04-04 11:18:21 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-04-04 11:18:21 +0200 |
commit | 7b3f9f74fb9bd764c1382849b9d66eb50ccf4e17 (patch) | |
tree | fbfc14b788b3d0d0635b54a6e295fefb1c4ab830 /includes/TaskMan.h | |
parent | b384e35959a17fc5b85655184534b96add5904b5 (diff) |
Diffstat (limited to 'includes/TaskMan.h')
-rw-r--r-- | includes/TaskMan.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/TaskMan.h b/includes/TaskMan.h index ba6d76f..573725f 100644 --- a/includes/TaskMan.h +++ b/includes/TaskMan.h @@ -3,9 +3,11 @@ #include <stdint.h> #include <curl/curl.h> #ifndef _WIN32 -#include <coro.h> #include <netdb.h> #endif +#ifdef __linux +#include <ucontext.h> +#endif #include <ev++.h> #ifdef _MSC_VER #include <hash_set> @@ -86,10 +88,12 @@ class TaskMan { void asyncIdleReady() { m_evt.send(); } -#ifndef _WIN32 - coro_context m_returnContext; -#else +#if defined(__linux) + ucontext_t m_returnContext; +#elif defined (_WIN32) void * m_fiber; +#else + void * m_returnContext; #endif friend class Task; friend class CurlTask; |