X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0a410068aa170636b4aa5d34e03a4cd3735a70c3..1943ca63ab0af58abc75c70054783d962737f3e9:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index ab44443d27..b6c5e60d28 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -31,8 +31,6 @@ static void SIMIX_comm_start(smx_action_t action); void SIMIX_network_init(void) { rdv_points = xbt_dict_new_homogeneous(SIMIX_rdv_free); - if(MC_is_active()) - MC_ignore_global_variable("smx_total_comms"); } void SIMIX_network_exit(void) @@ -290,9 +288,6 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type) return act; } -void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action){ - SIMIX_comm_destroy(action); -} /** * \brief Destroy a communicate action * \param action The communicate action to be destroyed @@ -364,7 +359,7 @@ void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_rdv_t rdv, smx_action_t comm = SIMIX_comm_isend(simcall->issuer, rdv, task_size, rate, src_buff, src_buff_size, match_fun, NULL, data, 0); - simcall->mc_value = 0; + SIMCALL_SET_MC_VALUE(simcall, 0); SIMIX_pre_comm_wait(simcall, comm, timeout); } smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_rdv_t rdv, @@ -459,7 +454,7 @@ void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, { smx_action_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff, dst_buff_size, match_fun, data, rate); - simcall->mc_value = 0; + SIMCALL_SET_MC_VALUE(simcall, 0); SIMIX_pre_comm_wait(simcall, comm, timeout); } @@ -607,7 +602,7 @@ void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double time simcall->issuer->waiting_action = action; if (MC_is_active()) { - int idx = simcall->mc_value; + int idx = SIMCALL_GET_MC_VALUE(simcall); if (idx == 0) { action->state = SIMIX_DONE; } else { @@ -671,7 +666,7 @@ void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions) simcall_comm_testany__set__result(simcall, -1); if (MC_is_active()){ - int idx = simcall->mc_value; + int idx = SIMCALL_GET_MC_VALUE(simcall); if(idx == -1){ SIMIX_simcall_answer(simcall); }else{ @@ -701,7 +696,7 @@ void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions) unsigned int cursor = 0; if (MC_is_active()){ - int idx = simcall->mc_value; + int idx = SIMCALL_GET_MC_VALUE(simcall); action = xbt_dynar_get_as(actions, idx, smx_action_t); xbt_fifo_push(action->simcalls, simcall); simcall_comm_waitany__set__result(simcall, idx); @@ -1105,14 +1100,14 @@ int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action * \brief verify if communication is latency bounded * \param comm The communication */ -XBT_INLINE int SIMIX_comm_is_latency_bounded(smx_action_t action) +int SIMIX_comm_is_latency_bounded(smx_action_t action) { if(!action){ return 0; } if (action->comm.surf_comm){ XBT_DEBUG("Getting latency limited for surf_action (%p)", action->comm.surf_comm); - action->latency_limited = surf_workstation_model->get_latency_limited(action->comm.surf_comm); + action->latency_limited = surf_network_action_get_latency_limited(action->comm.surf_comm); XBT_DEBUG("Action limited is %d", action->latency_limited); } return action->latency_limited;