summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Task.h8
-rw-r--r--includes/TaskMan.h12
2 files changed, 12 insertions, 8 deletions
diff --git a/includes/Task.h b/includes/Task.h
index 0f04b32..2577761 100644
--- a/includes/Task.h
+++ b/includes/Task.h
@@ -1,10 +1,10 @@
#pragma once
#include <stdlib.h>
-#include <functional>
-#ifndef _WIN32
-#include <coro.h>
+#ifdef __linux
+#include <ucontext.h>
#endif
+#include <functional>
#include <ev++.h>
#include <list>
#include <Exceptions.h>
@@ -243,7 +243,7 @@ class Task {
}
void * m_stack = NULL;
#ifndef _WIN32
- coro_context m_ctx;
+ ucontext_t m_ctx;
#else
void * m_fiber = NULL;
#endif
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;