From 1d796e6cf639354614f1152baab65d317271c357 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 16 Nov 2011 17:26:28 -0800 Subject: Kind of a big revamp of the TaskMan / Task model, in order to introduce a TaskScheduler. The idea is that we need to support multiple task managers from multiple threads. So that revamp means we now should be able to support that, except the TaskScheduler needs to implement a round robin system, to distribute tasks across multiple task managers. But at least, the fundamental redesign to permit this is here. --- includes/Task.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'includes/Task.h') diff --git a/includes/Task.h b/includes/Task.h index 156add2..22c522e 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -128,10 +128,13 @@ class Task { m_okayToEAgain = enable; return oldValue; } + TaskMan * getMyTaskMan() { return m_taskMan; } private: size_t stackSize() { return 128 * 1024; } + void setup(TaskMan * taskMan); void switchTo(); - static void CALLBACK coroutine(void *); + static void CALLBACK coroutineTrampoline(void *); + void coroutine(); void * m_stack; #ifndef _WIN32 coro_context m_ctx; -- cgit v1.2.3