xbt_dynar_t sg_platf_bypassRoute_cb_list = NULL; // of sg_platf_bypassRoute_cb_t
xbt_dynar_t sg_platf_bypassASroute_cb_list = NULL; // of sg_platf_bypassASroute_cb_t
-xbt_dynar_t sg_platf_trace_cb_list = NULL;
-
/* ***************************************** */
/* TUTORIAL: New TAG */
sg_platf_bypassRoute_cb_list = xbt_dynar_new(sizeof(sg_platf_route_cb_t), NULL);
sg_platf_bypassASroute_cb_list = xbt_dynar_new(sizeof(sg_platf_route_cb_t), NULL);
- sg_platf_trace_cb_list = xbt_dynar_new(sizeof(sg_platf_trace_cb_t), NULL);
-
/* ***************************************** */
/* TUTORIAL: New TAG */
xbt_dynar_free(&sg_platf_postparse_cb_list);
xbt_dynar_free(&sg_platf_cluster_cb_list);
- xbt_dynar_free(&sg_platf_trace_cb_list);
-
xbt_dynar_free(&sg_platf_ASroute_cb_list);
xbt_dynar_free(&sg_platf_bypassRoute_cb_list);
xbt_dynar_free(&sg_platf_bypassASroute_cb_list);
fun(bypassASroute);
}
}
-void sg_platf_new_trace(sg_platf_trace_cbarg_t trace) {
- unsigned int iterator;
- sg_platf_trace_cb_t fun;
- xbt_dynar_foreach(sg_platf_trace_cb_list, iterator, fun) {
- fun(trace);
- }
-}
void sg_platf_new_process(sg_platf_process_cbarg_t process)
{
void sg_platf_bypassASroute_add_cb(sg_platf_route_cb_t fct) {
xbt_dynar_push(sg_platf_bypassASroute_cb_list, &fct);
}
-void sg_platf_trace_add_cb(sg_platf_trace_cb_t fct) {
- xbt_dynar_push(sg_platf_trace_cb_list, &fct);
-}
void sg_platf_rng_stream_init(unsigned long seed[6]) {
RngStream_SetPackageSeed(seed);
sg_platf_rng_stream = RngStream_CreateStream(NULL);
current_routing->parseBypassroute(ASroute);
}
-static void routing_parse_trace(sg_platf_trace_cbarg_t trace)
+void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
{
tmgr_trace_t tmgr_trace;
if (!trace->file || strcmp(trace->file, "") != 0) {
sg_platf_postparse_add_cb(routing_parse_postparse);
sg_platf_postparse_add_cb(check_disk_attachment);
- sg_platf_trace_add_cb(routing_parse_trace);
-
instr_routing_define_callbacks();
}