diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-03-23 10:57:41 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-03-26 13:05:03 +0100 |
commit | 86153c191a6e0a6228d6d6c705a3e3271a4239be (patch) | |
tree | 42fe7b0eb37e07e15c1de2f5889a026be3b87ea0 /src/coroutine.h | |
parent | 38ba7e1705dca0894f79b9a0de1327ee3cd4c0bf (diff) |
Separate stack creation from construction.
This allows having either a convenient Coroutine-owned stack or
passing in stack memory manually.
Diffstat (limited to 'src/coroutine.h')
-rw-r--r-- | src/coroutine.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coroutine.h b/src/coroutine.h index 3e8269e..08c4108 100644 --- a/src/coroutine.h +++ b/src/coroutine.h @@ -13,8 +13,11 @@ public: }; public: - explicit Coroutine(int stackSize = 32768); + Coroutine(); virtual ~Coroutine(); + + void createStack(int size = 32768); + void setStack(void *memory, int size); bool cont(); static void yield(); @@ -35,9 +38,6 @@ private: // not copyable Coroutine &operator=(const Coroutine &); private: - // for the original coroutine - Coroutine(bool); - static void yieldHelper(Status stopStatus); static void entryPoint(); |