X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/567811b89be3e615ab755f6d5edf437b6b5daf42..20427e1463985c071ac551547d0906e282b43520:/src/surf/network_constant.c diff --git a/src/surf/network_constant.c b/src/surf/network_constant.c index d395e73a6d..c733bc8d3b 100644 --- a/src/surf/network_constant.c +++ b/src/surf/network_constant.c @@ -21,14 +21,12 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); static random_data_t random_latency = NULL; static int host_number_int = 0; -static void netcste_count_hosts(void) -{ +static void netcste_count_hosts(sg_platf_host_cbarg_t h) { host_number_int++; } -static void netcste_define_callbacks(const char *file) -{ - surfxml_add_callback(STag_surfxml_host_cb_list, &netcste_count_hosts); +static void netcste_define_callbacks(void) { + sg_platf_host_add_cb(netcste_count_hosts); } static int netcste_resource_used(void *resource_id) @@ -117,7 +115,7 @@ static surf_action_t netcste_communicate(const char *src_name, { surf_action_network_Constant_t action = NULL; - XBT_IN4("(%s,%s,%g,%g)", src_name, dst_name, size, rate); + XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate); action = surf_action_new(sizeof(s_surf_action_network_Constant_t), size, @@ -125,7 +123,7 @@ static surf_action_t netcste_communicate(const char *src_name, action->suspended = 0; - action->latency = 1; //random_generate(random_latency); + action->latency = sg_latency_factor; //random_generate(random_latency); action->lat_init = action->latency; if (action->latency <= 0.0) { @@ -134,7 +132,7 @@ static surf_action_t netcste_communicate(const char *src_name, xbt_swag_insert(action, action->generic_action.state_set); } - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } @@ -191,7 +189,7 @@ static void netcste_finalize(void) -void surf_network_model_init_Constant(const char *filename) +void surf_network_model_init_Constant() { xbt_assert(surf_network_model == NULL); if (surf_network_model) @@ -233,7 +231,7 @@ void surf_network_model_init_Constant(const char *filename) if (!random_latency) random_latency = random_new(RAND, 100, 0.0, 1.0, .125, .034); - netcste_define_callbacks(filename); + netcste_define_callbacks(); xbt_dynar_push(model_list, &surf_network_model); update_model_description(surf_network_model_description,