Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the waitany functions on semaphore and communications to return the rank of...
[simgrid.git] / src / include / simix / context.h
1 #ifndef XBT_CONTEXT_H
2 #define XBT_CONTEXT_H
3
4 #include "xbt/misc.h"                           /* XBT_PUBLIC(), SG_BEGIN_DECL() and SG_END_DECL() definitions  */
5 #include "xbt/function_types.h"         /* function pointer types declarations                                                  */      
6 #include "xbt_modinter.h"                       /* xbt_context_init() and xbt_context_exit() declarations               */
7      
8 SG_BEGIN_DECL() 
9  
10 typedef struct s_xbt_context *xbt_context_t;
11
12 XBT_PUBLIC(xbt_context_t) xbt_context_new(const char *name, xbt_main_func_t code,
13                 void_f_pvoid_t startup_func, void *startup_arg,
14                 void_f_pvoid_t cleanup_func, void *cleanup_arg, int argc, char *argv[]);
15
16 XBT_PUBLIC(void) xbt_context_kill(xbt_context_t context);
17
18 XBT_PUBLIC(void) xbt_context_start(xbt_context_t context);
19
20 XBT_PUBLIC(void) xbt_context_yield(void);
21
22 XBT_PUBLIC(void) xbt_context_schedule(xbt_context_t context);
23      
24 void xbt_context_empty_trash(void);
25
26 void xbt_context_stop(int exit_code);
27      
28 void xbt_context_free(xbt_context_t context);
29
30 SG_END_DECL() 
31  
32 #endif  /* !XBT_CONTEXT_H */