Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Only adds the XBT_PUBLIC macro decoration a the begining of the public API functions.
[simgrid.git] / src / gras / Virtu / virtu_sg.h
1 /* $Id$ */
2
3 /* virtu_sg - specific GRAS implementation for simulator                    */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #ifndef VIRTU_SG_H
11 #define VIRTU_SG_H
12
13 #include "gras/Virtu/virtu_private.h"
14 #include "xbt/dynar.h"
15 #include "msg/msg.h" /* SimGrid header */
16
17 typedef struct {
18   int port;  /* list of ports used by a server socket */
19   int tochan; /* the channel it points to */
20   int meas;   /* (boolean) the channel is for measurements or for messages */
21 } gras_sg_portrec_t;
22
23 /* Data for each host */
24 typedef struct {
25   int refcount;
26   int proc[XBT_MAX_CHANNEL]; /* PID of who's connected to each channel */
27                               /* If =0, then free */
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   int from_PID;    /* process which sent this message */
36   int to_PID;      /* process to which this message is destinated */
37
38   m_host_t to_host;   /* Who's on other side */
39   m_channel_t to_chan;/* Channel on which the other side is earing */
40 } gras_trp_sg_sock_data_t;
41
42
43 XBT_PUBLIC void *gras_libdata_by_name_from_remote(const char *name, m_process_t p);
44 /* The same function by id would be really dangerous.
45  * 
46  * Indeed, it would rely on the fact that all process register libdatas in
47  * the same order, which is wrong if they init amok modules in different
48  * order.
49  */
50    
51    
52 #endif /* VIRTU_SG_H */