summaryrefslogtreecommitdiff
path: root/includes/TaskMan.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-10-18 16:37:49 -0700
committerPixel <pixel@nobis-crew.org>2011-10-18 16:37:49 -0700
commit0db120afdfb818421dc5df3dc0946fafede78c93 (patch)
treee47403f57bcc39471d6c994c4f2951f4eb9ba108 /includes/TaskMan.h
parent4e07ceeb21dae4b6b8d5eaf7421228f735f14bda (diff)
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.
Diffstat (limited to 'includes/TaskMan.h')
-rw-r--r--includes/TaskMan.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/TaskMan.h b/includes/TaskMan.h
index 8144e93..ad19f65 100644
--- a/includes/TaskMan.h
+++ b/includes/TaskMan.h
@@ -1,7 +1,9 @@
#pragma once
#include <stdint.h>
+#ifndef _WIN32
#include <coro.h>
+#endif
#include <ev++.h>
#include <ext/hash_set>
#include <vector>
@@ -26,7 +28,11 @@ class TaskMan {
private:
void registerTask(Task * t);
void unregisterTask(Task * t);
+#ifndef _WIN32
coro_context m_returnContext;
+#else
+ void * m_fiber;
+#endif
friend class Task;
struct taskHasher { size_t operator()(const Task * t) const { return reinterpret_cast<uintptr_t>(t); } };
typedef gnu::hash_set<Task *, taskHasher> taskHash_t;