summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-04 11:18:21 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-04 11:18:21 +0200
commit7b3f9f74fb9bd764c1382849b9d66eb50ccf4e17 (patch)
treefbfc14b788b3d0d0635b54a6e295fefb1c4ab830 /includes
parentb384e35959a17fc5b85655184534b96add5904b5 (diff)
Removing libcoro.HEADmaster
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;