Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No need to rebuild the parser if you're not a maintainer.
[simgrid.git] / src / gras / Virtu / virtu_interface.h
1 /* $Id$ */
2
3 /* virtu[alization] - speciafic parts for each OS and for SG                */
4
5 /* module's public interface exported within GRAS, but not to end user.     */
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 #ifndef GRAS_VIRTU_INTERFACE_H
13 #define GRAS_VIRTU_INTERFACE_H
14
15 #include "xbt/sysdep.h"
16 #include "xbt/log.h"
17 #include "xbt/error.h"
18 #include "xbt/dynar.h"
19 #include "gras/virtu.h"
20 #include "gras/process.h"
21
22 /**
23  * gras_process_data_t:
24  *
25  * Data for each process 
26  */
27 typedef struct {
28   /*queue of msgs storing the ones got while msg_wait'ing for something else */
29   xbt_dynar_t msg_queue; /* elm type: gras_msg_t */
30
31   /* registered callbacks for each message */
32   xbt_dynar_t cbl_list; /* elm type: gras_cblist_t */
33    
34   /* SG only elements. In RL, they are part of the OS ;) */
35   int chan;    /* Formated messages channel */
36   int rawChan; /* Unformated echange channel */
37   xbt_dynar_t sockets; /* all sockets known to this process */
38
39   /* globals of the process */
40   void *userdata;               
41 } gras_procdata_t;
42
43 /* Access */
44 xbt_dynar_t gras_socketset_get(void);
45
46 /* FIXME: mv to _private? */
47 gras_procdata_t *gras_procdata_get(void);
48 void gras_procdata_init(void);
49 void gras_procdata_exit(void);
50 #endif  /* GRAS_VIRTU_INTERFACE_H */