Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define correctly variables for windows.
[simgrid.git] / src / gras / Virtu / virtu_sg.h
1 /* virtu_sg - specific GRAS implementation for simulator                    */
2
3 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef VIRTU_SG_H
10 #define VIRTU_SG_H
11
12 #include "gras/Virtu/virtu_private.h"
13 #include "xbt/dynar.h"
14 #include "simix/simix.h"        /* SimGrid header */
15 #include "gras/Transport/transport_private.h"
16
17 typedef struct {
18   int port;                     /* list of ports used by a server socket */
19   int meas;                     /* (boolean) the channel is for measurements or for messages */
20   smx_process_t process; /* process listening */
21   smx_rdv_t rdv; /* rendez-vous point to the listener */
22 //  gras_socket_t socket; FIXME KILLME
23 } gras_sg_portrec_t;
24
25 /* Data for each host */
26 typedef struct {
27   int refcount;
28
29   xbt_dynar_t ports;
30
31 } gras_hostdata_t;
32
33 /* data for each socket (FIXME: find a better location for that)*/
34 typedef struct {
35   smx_process_t from_process;
36   smx_process_t to_process;
37
38   smx_host_t to_host;           /* Who's on other side */
39
40   smx_rdv_t rdv_server; /* The rendez-vous point to use */
41   smx_rdv_t rdv_client; /* The rendez-vous point to use */
42   int im_server:1;
43   smx_comm_t comm_recv; /* The comm of irecv on receiving sockets */
44 } gras_trp_sg_sock_data_t;
45
46
47 void *gras_libdata_by_name_from_remote(const char *name, smx_process_t p);
48 /* The same function by id would be really dangerous.
49  * 
50  * Indeed, it would rely on the fact that all process register libdatas in
51  * the same order, which is wrong if they init amok modules in different
52  * order.
53  */
54
55 #endif /* VIRTU_SG_H */