static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall);
static void SIMIX_comm_copy_data(smx_action_t comm);
static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall);
static void SIMIX_comm_copy_data(smx_action_t comm);
XBT_DEBUG("iprobe from %p %p\n", rdv, rdv->comm_fifo);
smx_action_t this_action = SIMIX_comm_new(SIMIX_COMM_RECEIVE);
XBT_DEBUG("iprobe from %p %p\n", rdv, rdv->comm_fifo);
smx_action_t this_action = SIMIX_comm_new(SIMIX_COMM_RECEIVE);
if(rdv->permanent_receiver && xbt_fifo_size(rdv->done_comm_fifo)!=0){
//find a match in the already received fifo
if(rdv->permanent_receiver && xbt_fifo_size(rdv->done_comm_fifo)!=0){
//find a match in the already received fifo
other_action = SIMIX_fifo_probe_comm(rdv->done_comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_action);
other_action = SIMIX_fifo_probe_comm(rdv->done_comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_action);
xbt_fifo_push(action->simcalls, simcall);
simcall->issuer->waiting_action = action;
xbt_fifo_push(action->simcalls, simcall);
simcall->issuer->waiting_action = action;
simcall->comm_test.result = action->comm.src_proc && action->comm.dst_proc;
if(simcall->comm_test.result){
action->state = SIMIX_DONE;
simcall->comm_test.result = action->comm.src_proc && action->comm.dst_proc;
if(simcall->comm_test.result){
action->state = SIMIX_DONE;
action = xbt_dynar_get_as(actions, idx, smx_action_t);
xbt_fifo_push(action->simcalls, simcall);
simcall->comm_waitany.result = idx;
action = xbt_dynar_get_as(actions, idx, smx_action_t);
xbt_fifo_push(action->simcalls, simcall);
simcall->comm_waitany.result = idx;
return it as the result of the simcall */
if (simcall->call == SIMCALL_COMM_WAITANY) {
SIMIX_waitany_remove_simcall_from_actions(simcall);
return it as the result of the simcall */
if (simcall->call == SIMCALL_COMM_WAITANY) {
SIMIX_waitany_remove_simcall_from_actions(simcall);
SIMIX_rdv_remove(action->comm.rdv, action);
action->state = SIMIX_CANCELED;
}
SIMIX_rdv_remove(action->comm.rdv, action);
action->state = SIMIX_CANCELED;
}
&& (action->state == SIMIX_READY || action->state == SIMIX_RUNNING)) {
surf_workstation_model->action_cancel(action->comm.surf_comm);
&& (action->state == SIMIX_READY || action->state == SIMIX_RUNNING)) {
surf_workstation_model->action_cancel(action->comm.surf_comm);