X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/31b376e584d44ffd9efb74a8a44c2ade3f2d918f..802b8b24b1a8c9e15b5dd40936309327a058a00e:/src/xbt/xbt_ucontext.c diff --git a/src/xbt/xbt_ucontext.c b/src/xbt/xbt_ucontext.c index 0f2c3cea56..481b479208 100644 --- a/src/xbt/xbt_ucontext.c +++ b/src/xbt/xbt_ucontext.c @@ -2,7 +2,18 @@ #include "ucontext_stack.h" #include "xbt/ex_interface.h" #include "xbt/xbt_context_factory.h" -#include "xbt/xbt_ucontext.h" + +#include "ucontext_stack.h" /* loads context system definitions */ +#include /* context relative declarations */ +#define STACK_SIZE 128*1024 /* lower this if you want to reduce the memory consumption */ + +typedef struct s_xbt_ucontext { + XBT_CTX_BASE_T; + ucontext_t uc; /* the thread that execute the code */ + char stack[STACK_SIZE]; /* the thread stack size */ + struct s_xbt_ucontext* prev; /* the previous thread */ +} s_xbt_ucontext_t,* xbt_ucontext_t; + /* callback: context fetching */ static ex_ctx_t*