- Make it private to surf
- dont pass it as parameter in public API. That's a singleton after all
typedef simgrid::surf::NetCard surf_NetCard;
typedef simgrid::surf::Link Link;
typedef simgrid::surf::Resource surf_Resource;
typedef simgrid::surf::NetCard surf_NetCard;
typedef simgrid::surf::Link Link;
typedef simgrid::surf::Resource surf_Resource;
-typedef simgrid::trace_mgr::future_evt_set sg_future_evt_set;
typedef struct surf_NetCard surf_NetCard;
typedef struct surf_Resource surf_Resource;
typedef struct Link Link;
typedef struct surf_NetCard surf_NetCard;
typedef struct surf_Resource surf_Resource;
typedef struct Link Link;
-typedef struct future_evt_set sg_future_evt_set;
#endif
typedef simgrid_Host* sg_host_t;
#endif
typedef simgrid_Host* sg_host_t;
typedef surf_Cpu *surf_cpu_t;
typedef surf_NetCard *sg_netcard_t;
typedef surf_Resource *sg_resource_t;
typedef surf_Cpu *surf_cpu_t;
typedef surf_NetCard *sg_netcard_t;
typedef surf_Resource *sg_resource_t;
-typedef sg_future_evt_set *sg_future_evt_set_t;
// Types which are in fact dictelmt:
typedef xbt_dictelm_t sg_storage_t;
// Types which are in fact dictelmt:
typedef xbt_dictelm_t sg_storage_t;
}
LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
}
LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props,
- double bw_initial,
- tmgr_trace_t bw_trace,
- double lat_initial,
- tmgr_trace_t lat_trace,
- int initiallyOn,
- tmgr_trace_t state_trace,
+ double bw_initial, tmgr_trace_t bw_trace,
+ double lat_initial, tmgr_trace_t lat_trace,
+ int initiallyOn, tmgr_trace_t state_trace,
e_surf_link_sharing_policy_t policy)
e_surf_link_sharing_policy_t policy)
- : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bw_initial), future_evt_set, state_trace)
+ : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bw_initial), state_trace)
{
m_bandwidth.peak = bw_initial;
if (bw_trace)
{
m_bandwidth.peak = bw_initial;
if (bw_trace)
"Link '%s' declared several times in the platform",
name);
"Link '%s' declared several times in the platform",
name);
- Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bw_initial, future_evt_set,
+ Link* link = new NetworkCm02Link(this, name, properties, p_maxminSystem, sg_bandwidth_factor * bw_initial,
initiallyOn, state_trace, bw_initial, bw_trace, lat_initial, lat_trace, policy);
Link::onCreation(link);
return link;
initiallyOn, state_trace, bw_initial, bw_trace, lat_initial, lat_trace, policy);
Link::onCreation(link);
return link;
NetworkCm02Link::NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
lmm_system_t system,
double constraint_value,
NetworkCm02Link::NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
lmm_system_t system,
double constraint_value,
- sg_future_evt_set_t fes,
int initiallyOn, tmgr_trace_t state_trace,
double bw_peak, tmgr_trace_t bw_trace,
double lat_initial, tmgr_trace_t lat_trace,
e_surf_link_sharing_policy_t policy)
int initiallyOn, tmgr_trace_t state_trace,
double bw_peak, tmgr_trace_t bw_trace,
double lat_initial, tmgr_trace_t lat_trace,
e_surf_link_sharing_policy_t policy)
-: Link(model, name, props, lmm_constraint_new(system, this, constraint_value), fes, state_trace)
+: Link(model, name, props, lmm_constraint_new(system, this, constraint_value), state_trace)
{
if (initiallyOn)
turnOn();
{
if (initiallyOn)
turnOn();
m_bandwidth.scale = 1.0;
m_bandwidth.peak = bw_peak;
if (bw_trace)
m_bandwidth.scale = 1.0;
m_bandwidth.peak = bw_peak;
if (bw_trace)
- m_bandwidth.event = fes->add_trace(bw_trace, 0.0, this);
+ m_bandwidth.event = future_evt_set->add_trace(bw_trace, 0.0, this);
else
m_bandwidth.event = NULL;
m_latency.scale = 1.0;
m_latency.peak = lat_initial;
if (lat_trace)
else
m_bandwidth.event = NULL;
m_latency.scale = 1.0;
m_latency.peak = lat_initial;
if (lat_trace)
- m_latency.event = fes->add_trace(lat_trace, 0.0, this);
+ m_latency.event = future_evt_set->add_trace(lat_trace, 0.0, this);
if (policy == SURF_LINK_FATPIPE)
lmm_constraint_shared(getConstraint());
if (policy == SURF_LINK_FATPIPE)
lmm_constraint_shared(getConstraint());
NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
lmm_system_t system,
double constraint_value,
NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
lmm_system_t system,
double constraint_value,
- sg_future_evt_set_t fes,
int initiallyOn,
tmgr_trace_t state_trace,
double metric_peak,
int initiallyOn,
tmgr_trace_t state_trace,
double metric_peak,
Link::Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props,
lmm_constraint_t constraint,
Link::Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props,
lmm_constraint_t constraint,
- sg_future_evt_set_t fes,
tmgr_trace_t state_trace)
: Resource(model, name, constraint),
PropertyHolder(props)
tmgr_trace_t state_trace)
: Resource(model, name, constraint),
PropertyHolder(props)
m_latency.scale = 1;
m_bandwidth.scale = 1;
if (state_trace)
m_latency.scale = 1;
m_bandwidth.scale = 1;
if (state_trace)
- m_stateEvent = fes->add_trace(state_trace, 0.0, this);
+ m_stateEvent = future_evt_set->add_trace(state_trace, 0.0, this);
links->insert({name, this});
XBT_DEBUG("Create link '%s'",name);
links->insert({name, this});
XBT_DEBUG("Create link '%s'",name);
* @param name The name of the Link
* @param props Dictionary of properties associated to this Link
* @param constraint The lmm constraint associated to this Cpu if it is part of a LMM component
* @param name The name of the Link
* @param props Dictionary of properties associated to this Link
* @param constraint The lmm constraint associated to this Cpu if it is part of a LMM component
- * @param fes Future Event Set in which our events must be registered
* @param state_trace [TODO]
*/
Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props,
lmm_constraint_t constraint,
* @param state_trace [TODO]
*/
Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props,
lmm_constraint_t constraint,
- sg_future_evt_set_t fes,
tmgr_trace_t state_trace);
/* Link destruction logic */
tmgr_trace_t state_trace);
/* Link destruction logic */
xbt_dynar_t all_existing_models = NULL; /* to destroy models correctly */
xbt_dynar_t model_list_invoke = NULL; /* to invoke callbacks */
xbt_dynar_t all_existing_models = NULL; /* to destroy models correctly */
xbt_dynar_t model_list_invoke = NULL; /* to invoke callbacks */
-sg_future_evt_set_t future_evt_set = nullptr;
+simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
xbt_dynar_t surf_path = NULL;
xbt_dynar_t host_that_restart = NULL;
xbt_dict_t watched_hosts_lib;
xbt_dynar_t surf_path = NULL;
xbt_dynar_t host_that_restart = NULL;
xbt_dict_t watched_hosts_lib;
#include "simgrid/platf_interface.h"
#include "surf/surf.h"
#include "src/surf/surf_private.h"
#include "simgrid/platf_interface.h"
#include "surf/surf.h"
#include "src/surf/surf_private.h"
-#include "src/surf/trace_mgr.hpp"
#include "src/internal_config.h"
#include "src/internal_config.h"
-extern XBT_PRIVATE sg_future_evt_set_t future_evt_set;
#define NO_MAX_DURATION -1.0
/*********
#define NO_MAX_DURATION -1.0
/*********
SURF_ROUTING_RECURSIVE /**< Recursive case: also return gateway informations */
} e_surf_routing_hierarchy_t;
SURF_ROUTING_RECURSIVE /**< Recursive case: also return gateway informations */
} e_surf_routing_hierarchy_t;
+extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set *future_evt_set;
+
+
XBT_PUBLIC(void) routing_model_create(void *loopback);
XBT_PUBLIC(void) routing_exit(void);
XBT_PUBLIC(void) storage_register_callbacks(void);
XBT_PUBLIC(void) routing_model_create(void *loopback);
XBT_PUBLIC(void) routing_exit(void);
XBT_PUBLIC(void) storage_register_callbacks(void);