Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make msg_mailbox_t be the s4u::Mailbox
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SG_PLATF_TYPES_H
8 #define SG_PLATF_TYPES_H
9
10 #ifdef __cplusplus
11
12 #include <boost/intrusive_ptr.hpp>
13
14 namespace simgrid {
15   namespace s4u {
16     class As;
17     class Host;
18     class Mailbox;
19   }
20   namespace kernel {
21      namespace activity {
22        class Synchro;
23      }
24      namespace routing {
25        class NetCard;
26      }
27   }
28   namespace surf {
29     class Resource;
30     class Cpu;
31     class Link;
32   }
33   namespace trace_mgr {
34     class trace;
35     class future_evt_set;
36   }
37 }
38
39 typedef simgrid::s4u::As simgrid_As;
40 typedef simgrid::s4u::Host simgrid_Host;
41 typedef boost::intrusive_ptr<simgrid::s4u::Mailbox> sg_mbox_t;
42 typedef simgrid::kernel::activity::Synchro simgrid_Synchro;
43 typedef simgrid::kernel::routing::NetCard routing_NetCard;
44 typedef simgrid::surf::Cpu surf_Cpu;
45 typedef simgrid::surf::Link Link;
46 typedef simgrid::surf::Resource surf_Resource;
47 typedef simgrid::trace_mgr::trace tmgr_Trace;
48
49 #else
50
51 typedef struct simgrid_As   simgrid_As;
52 typedef struct simgrid_Host simgrid_Host;
53 typedef struct simgrid_Mailbox *sg_mbox_t;
54 typedef struct simgrid_Synchro simgrid_Synchro;
55 typedef struct surf_Cpu surf_Cpu;
56 typedef struct routing_NetCard routing_NetCard;
57 typedef struct surf_Resource surf_Resource;
58 typedef struct Link Link;
59 typedef struct Trace tmgr_Trace;
60 #endif
61
62 typedef simgrid_As *AS_t;
63 typedef simgrid_Host* sg_host_t;
64
65 typedef simgrid_Synchro *smx_synchro_t;
66
67 typedef surf_Cpu *surf_cpu_t;
68 typedef routing_NetCard *sg_netcard_t;
69 typedef surf_Resource *sg_resource_t;
70
71 // Types which are in fact dictelmt:
72 typedef struct s_xbt_dictelm *sg_storage_t;
73
74 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
75
76 typedef struct s_smx_simcall s_smx_simcall_t;
77 typedef struct s_smx_simcall* smx_simcall_t;
78
79 typedef enum {
80   SURF_LINK_FULLDUPLEX = 2,
81   SURF_LINK_SHARED = 1,
82   SURF_LINK_FATPIPE = 0
83 } e_surf_link_sharing_policy_t;
84
85 typedef enum {
86   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
87   SURF_TRACE_CONNECT_KIND_SPEED = 3,
88   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
89   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
90   SURF_TRACE_CONNECT_KIND_LATENCY = 0
91 } e_surf_trace_connect_kind_t;
92
93 typedef enum {
94   SURF_PROCESS_ON_FAILURE_DIE = 1,
95   SURF_PROCESS_ON_FAILURE_RESTART = 0
96 } e_surf_process_on_failure_t;
97
98
99 /** @ingroup m_datatypes_management_details
100  * @brief Type for any simgrid size
101  */
102 typedef unsigned long long sg_size_t;
103
104 /** @ingroup m_datatypes_management_details
105  * @brief Type for any simgrid offset
106  */
107 typedef long long sg_offset_t;
108
109 #endif