16 #ifndef __OMNETPP_CCOROUTINE_H 17 #define __OMNETPP_CCOROUTINE_H 19 #include "platdep/platmisc.h" 20 #include "simkerneldefs.h" 22 #if !defined(USE_WIN32_FIBERS) && !defined(USE_POSIX_COROUTINES) && !defined(USE_PORTABLE_COROUTINES) 23 #error "Coroutine library choice not specified" 26 #ifdef USE_POSIX_COROUTINES 32 #ifdef USE_PORTABLE_COROUTINES 70 #ifdef USE_WIN32_FIBERS 72 static LPVOID lpMainFiber;
75 #ifdef USE_POSIX_COROUTINES 76 static ucontext_t mainContext;
77 static ucontext_t *curContextPtr;
78 static unsigned totalStackLimit;
79 static unsigned totalStackUsage;
84 #ifdef USE_PORTABLE_COROUTINES 96 static void init(
unsigned totalStack,
unsigned mainStack);
108 static void switchToMain();
119 bool setup(
CoroutineFnp fnp,
void *arg,
unsigned stackSize);
149 virtual bool hasStackOverflow()
const;
154 virtual unsigned getStackSize()
const;
164 virtual unsigned getStackUsage()
const;
void(* CoroutineFnp)(void *)
Prototype for functions that can be used with cCoroutine objects as coroutine bodies.
Definition: ccoroutine.h:42
Low-level coroutine library. Coroutines are used by cSimpleModule.
Definition: ccoroutine.h:67
Definition: cabstracthistogram.h:21