diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-17 11:17:57 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-17 11:17:57 -0800 |
commit | 2cb2961c9f6062e867b6ccc3d9067f55c7b81ea4 (patch) | |
tree | 7846e0849a6f2cde216596a1ab144a69c50f5a60 /src/Task.cc | |
parent | e435e4bb3c0744acf5b36c6e441d309d10af1257 (diff) |
Cleaning some code, redesigning a bit the stack allocation problem from the task manager, and actually implementing it properly.
Diffstat (limited to 'src/Task.cc')
-rw-r--r-- | src/Task.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Task.cc b/src/Task.cc index d72decc..440ed0e 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -21,12 +21,14 @@ bool Balau::Task::needsStacks() { #endif } -void Balau::Task::setup(TaskMan * taskMan) { +void Balau::Task::setup(TaskMan * taskMan, void * stack) { size_t size = stackSize(); #ifndef _WIN32 - m_stack = taskMan->getStack(); + Assert(stack); + m_stack = stack; coro_create(&m_ctx, coroutineTrampoline, this, m_stack, size); #else + Assert(!stack); m_stack = NULL; m_fiber = CreateFiber(size, coroutineTrampoline, this); #endif |