Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The file containing the new implementation of the switch context mechanism.
[simgrid.git] / include / xbt / xbt_context.h
1 #ifndef XBT_CONTEXT_H\r
2 #define XBT_CONTEXT_H\r
3 \r
4 #include "xbt/misc.h"                           /* XBT_PUBLIC(), SG_BEGIN_DECL() and SG_END_DECL() definitions  */\r
5 #include "xbt/function_types.h"         /* function pointer types declarations                                                  */      \r
6 #include "xbt_modinter.h"                       /* xbt_context_init() and xbt_context_exit() declarations               */\r
7 \r
8 SG_BEGIN_DECL()\r
9 \r
10 typedef struct s_xbt_context* xbt_context_t;\r
11 \r
12 XBT_PUBLIC(xbt_context_t) \r
13 xbt_context_new(const char*name,xbt_main_func_t code,void_f_pvoid_t startup_func, void *startup_arg,void_f_pvoid_t cleanup_func, void *cleanup_arg,int argc, char *argv[]);\r
14 \r
15 XBT_PUBLIC(void) \r
16 xbt_context_kill(xbt_context_t context);\r
17 \r
18 XBT_PUBLIC(void) \r
19 xbt_context_start(xbt_context_t context);\r
20 \r
21 XBT_PUBLIC(void) \r
22 xbt_context_yield(void);\r
23 \r
24 XBT_PUBLIC(void) \r
25 xbt_context_schedule(xbt_context_t context);\r
26 \r
27 void \r
28 xbt_context_empty_trash(void);\r
29 \r
30 void\r
31 xbt_context_stop(int exit_code);\r
32 \r
33 void\r
34 xbt_context_free(xbt_context_t context);\r
35 \r
36 \r
37 SG_END_DECL()\r
38 \r
39 #endif /* !XBT_CONTEXT_H */\r