Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
these files are useless in the new implementation of the context switch mechanism
[simgrid.git] / src / xbt / xbt_ucontext.h
1 #ifndef _XBT_UCONTEXT_H\r
2 #define _XBT_UCONTEXT_H\r
3 \r
4 #include "ucontext_stack.h"             /* loads context system definitions                                                                                                                     */\r
5 #include <ucontext.h>                   /* context relative declarations                                                                                                                        */                              \r
6 #define STACK_SIZE 128*1024             /* lower this if you want to reduce the memory consumption                                                                      */\r
7 \r
8 #ifndef _XBT_CONTEXT_FACTORY_T_DEFINED\r
9 typedef struct s_xbt_context_factory* xbt_context_factory_t;\r
10 #define _XBT_CONTEXT_FACTORY_T_DEFINED\r
11 #endif /* !_XBT_CONTEXT_FACTORY_T_DEFINED */\r
12 \r
13 typedef struct s_xbt_ucontext\r
14 {\r
15         XBT_CTX_BASE_T;\r
16         ucontext_t uc;                                  /* the thread that execute the code                                                                                                                     */\r
17         char stack[STACK_SIZE];                 /* the thread stack size                                                                                                                                        */\r
18         struct s_xbt_ucontext* prev;            /* the previous thread                                                                                                                                  */\r
19 }s_xbt_ucontext_t,* xbt_ucontext_t;\r
20 \r
21 \r
22 int\r
23 xbt_ucontext_factory_init(xbt_context_factory_t* factory);\r
24 \r
25 SG_END_DECL()\r
26 \r
27 #endif /* !_XBT_UCONTEXT_H */\r