Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make dictionary internal table dynamic (and automatically resized).
[simgrid.git] / src / xbt / xbt_ucontext.c
index bdfa830..481b479 100644 (file)
@@ -1,5 +1,19 @@
 \r
 #include "ucontext_stack.h"\r
+#include "xbt/ex_interface.h"\r
+#include "xbt/xbt_context_factory.h"\r
+\r
+#include "ucontext_stack.h"            /* loads context system definitions                             */\r
+#include <ucontext.h>                  /* context relative declarations                                */                              \r
+#define STACK_SIZE 128*1024            /* lower this if you want to reduce the memory consumption      */\r
+\r
+typedef struct s_xbt_ucontext {\r
+   XBT_CTX_BASE_T;\r
+       ucontext_t uc;                  /* the thread that execute the code                             */\r
+       char stack[STACK_SIZE];         /* the thread stack size                                        */\r
+       struct s_xbt_ucontext* prev;    /* the previous thread                                          */\r
+} s_xbt_ucontext_t,* xbt_ucontext_t;\r
+\r
 \r
 /* callback: context fetching */\r
 static ex_ctx_t*\r