1 /* Copyright (c) 2004-2015. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef SG_PLATF_TYPES_H
8 #define SG_PLATF_TYPES_H
12 #include "s4u/forward.hpp"
14 #include <boost/intrusive_ptr.hpp>
20 using ActivityImplPtr = boost::intrusive_ptr<ActivityImpl>;
21 XBT_PUBLIC(void) intrusive_ptr_add_ref(ActivityImpl* activity);
22 XBT_PUBLIC(void) intrusive_ptr_release(ActivityImpl* activity);
25 using CommImplPtr = boost::intrusive_ptr<CommImpl>;
27 using ExecImplPtr = boost::intrusive_ptr<ExecImpl>;
29 using IoImplPtr = boost::intrusive_ptr<IoImpl>;
31 using RawImplPtr = boost::intrusive_ptr<RawImpl>;
33 using SleepImplPtr = boost::intrusive_ptr<SleepImpl>;
55 typedef simgrid::s4u::Actor s4u_Actor;
56 typedef simgrid::s4u::Host s4u_Host;
57 typedef simgrid::s4u::Link s4u_Link;
58 typedef simgrid::s4u::File s4u_File;
59 typedef simgrid::s4u::Storage s4u_Storage;
60 typedef simgrid::s4u::NetZone s4u_NetZone;
61 typedef boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> smx_activity_t;
62 typedef simgrid::kernel::routing::NetPoint routing_NetPoint;
63 typedef simgrid::surf::Resource surf_Resource;
64 typedef simgrid::trace_mgr::trace tmgr_Trace;
68 typedef struct s4u_Actor s4u_Actor;
69 typedef struct s4u_Host s4u_Host;
70 typedef struct s4u_Link s4u_Link;
71 typedef struct s4u_File s4u_File;
72 typedef struct s4u_Storage s4u_Storage;
73 typedef struct s4u_NetZone s4u_NetZone;
74 typedef struct kernel_Activity* smx_activity_t;
75 typedef struct routing_NetPoint routing_NetPoint;
76 typedef struct surf_Resource surf_Resource;
77 typedef struct Trace tmgr_Trace;
81 typedef s4u_NetZone* sg_netzone_t;
82 typedef s4u_Host* sg_host_t;
83 typedef s4u_Link* sg_link_t;
84 typedef s4u_Storage* sg_storage_t;
85 typedef s4u_File* sg_file_t;
87 typedef routing_NetPoint* sg_netpoint_t;
88 typedef surf_Resource *sg_resource_t;
90 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
92 typedef struct s_smx_simcall s_smx_simcall_t;
93 typedef struct s_smx_simcall* smx_simcall_t;
96 SURF_LINK_FULLDUPLEX = 2,
99 } e_surf_link_sharing_policy_t;
102 SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
103 SURF_TRACE_CONNECT_KIND_SPEED = 3,
104 SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
105 SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
106 SURF_TRACE_CONNECT_KIND_LATENCY = 0
107 } e_surf_trace_connect_kind_t;
110 SURF_ACTOR_ON_FAILURE_DIE = 1,
111 SURF_ACTOR_ON_FAILURE_RESTART = 0
112 } e_surf_process_on_failure_t;
115 /** @ingroup m_datatypes_management_details
116 * @brief Type for any simgrid size
118 typedef unsigned long long sg_size_t;
120 /** @ingroup m_datatypes_management_details
121 * @brief Type for any simgrid offset
123 typedef long long sg_offset_t;
125 typedef unsigned long aid_t;