Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
f9ce9434caf5b32acb4d68d679158b50144e4b72
[simgrid.git] / src / gras / Virtu / virtu_private.h
1 /* $Id$ */
2
3 /* virtu[alization] - speciafic parts for each OS and for SG                */
4
5 /* module's private interface.                                              */
6
7 /* Copyright (c) 2004 Martin Quinson. All rights reserved.                  */
8
9 /* This program is free software; you can redistribute it and/or modify it
10  * under the terms of the license (GNU LGPL) which comes with this package. */
11
12
13 #ifndef GRAS_VIRTU_PRIVATE_H
14 #define GRAS_VIRTU_PRIVATE_H
15
16 #include "xbt/dynar.h"
17 #include "gras/Virtu/virtu_interface.h"
18 #include "simix/simix.h"
19
20 void gras_global_init(int *argc, char **argv);
21 void gras_create_environment(const char *file);
22 void gras_function_register(const char *name, void* code);
23 void gras_launch_application(const char *file);
24 void gras_clean(void);
25 void gras_main(void);
26
27
28 /** @brief Data for each process */
29 typedef struct {
30   /* globals of the process */
31   void *userdata;
32
33   /* data specific to each process for each module. 
34    * Registered with gras_procdata_add(), retrieved with gras_libdata_get() 
35    * This is the old interface, and will disapear before 3.2
36    */
37   xbt_set_t libdata;
38    
39   /* data specific to each process for each module. 
40    * Registered with gras_module_add(), retrieved with gras_moddata_get() 
41    * This is the new interface
42    */
43   xbt_dynar_t moddata;
44         
45   int pid; /* pid of process, only for SG */
46   int ppid; /* ppid of process, only for SG */
47 } gras_procdata_t;
48
49 gras_procdata_t *gras_procdata_get(void);
50 void *gras_libdata_by_name_from_procdata(const char *name, gras_procdata_t* pd);
51    
52    
53 #endif  /* GRAS_VIRTU_PRIVATE_H */