-void SIMIX_request_pre(smx_req_t req)
-{
- switch (req->call) {
-
- case REQ_HOST_GET_BY_NAME:
- req->host_get_by_name.result =
- SIMIX_host_get_by_name(req->host_get_by_name.name);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_NAME:
- req->host_get_name.result = SIMIX_host_get_name(req->host_get_name.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_PROPERTIES:
- req->host_get_properties.result =
- SIMIX_host_get_properties(req->host_get_properties.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_SPEED:
- req->host_get_speed.result =
- SIMIX_host_get_speed(req->host_get_speed.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_AVAILABLE_SPEED:
- req->host_get_available_speed.result =
- SIMIX_host_get_available_speed(req->host_get_available_speed.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_STATE:
- req->host_get_state.result =
- SIMIX_host_get_state(req->host_get_state.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_GET_DATA:
- req->host_get_data.result = SIMIX_host_get_data(req->host_get_data.host);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_SET_DATA:
- SIMIX_host_set_data(req->host_set_data.host, req->host_set_data.data);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTE:
- req->host_execute.result = SIMIX_host_execute(
- req->host_execute.name,
- req->host_execute.host,
- req->host_execute.computation_amount);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_PARALLEL_EXECUTE:
- req->host_parallel_execute.result = SIMIX_host_parallel_execute(
- req->host_parallel_execute.name,
- req->host_parallel_execute.host_nb,
- req->host_parallel_execute.host_list,
- req->host_parallel_execute.computation_amount,
- req->host_parallel_execute.communication_amount,
- req->host_parallel_execute.amount,
- req->host_parallel_execute.rate);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTION_DESTROY:
- SIMIX_host_execution_destroy(req->host_execution_destroy.execution);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTION_CANCEL:
- SIMIX_host_execution_cancel(req->host_execution_cancel.execution);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTION_GET_REMAINS:
- req->host_execution_get_remains.result =
- SIMIX_host_execution_get_remains(req->host_execution_get_remains.execution);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTION_GET_STATE:
- req->host_execution_get_state.result =
- SIMIX_host_execution_get_state(req->host_execution_get_state.execution);
- SIMIX_request_answer(req);
- break;
- case REQ_HOST_EXECUTION_SET_PRIORITY:
+ case SIMCALL_COMM_ISEND:
+ simcall->comm_isend.result = SIMIX_comm_isend(
+ simcall->issuer,
+ simcall->comm_isend.rdv,
+ simcall->comm_isend.task_size,
+ simcall->comm_isend.rate,
+ simcall->comm_isend.src_buff,
+ simcall->comm_isend.src_buff_size,
+ simcall->comm_isend.match_fun,
+ simcall->comm_isend.clean_fun,
+ simcall->comm_isend.data,
+ simcall->comm_isend.detached);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_RECV:
+ {
+ smx_action_t comm = SIMIX_comm_irecv(
+ simcall->issuer,
+ simcall->comm_recv.rdv,
+ simcall->comm_recv.dst_buff,
+ simcall->comm_recv.dst_buff_size,
+ simcall->comm_recv.match_fun,
+ simcall->comm_recv.data);
+ SIMIX_pre_comm_wait(simcall, comm, simcall->comm_recv.timeout, 0);
+ break;
+ }
+
+ case SIMCALL_COMM_IRECV:
+ simcall->comm_irecv.result = SIMIX_comm_irecv(
+ simcall->issuer,
+ simcall->comm_irecv.rdv,
+ simcall->comm_irecv.dst_buff,
+ simcall->comm_irecv.dst_buff_size,
+ simcall->comm_irecv.match_fun,
+ simcall->comm_irecv.data);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_DESTROY:
+ SIMIX_comm_destroy(simcall->comm_destroy.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_CANCEL:
+ SIMIX_comm_cancel(simcall->comm_cancel.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_REMAINS:
+ simcall->comm_get_remains.result =
+ SIMIX_comm_get_remains(simcall->comm_get_remains.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_STATE:
+ simcall->comm_get_state.result =
+ SIMIX_comm_get_state(simcall->comm_get_state.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_SRC_DATA:
+ simcall->comm_get_src_data.result = SIMIX_comm_get_src_data(simcall->comm_get_src_data.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_DST_DATA:
+ simcall->comm_get_dst_data.result = SIMIX_comm_get_dst_data(simcall->comm_get_dst_data.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_SRC_PROC:
+ simcall->comm_get_src_proc.result =
+ SIMIX_comm_get_src_proc(simcall->comm_get_src_proc.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_COMM_GET_DST_PROC:
+ simcall->comm_get_dst_proc.result =
+ SIMIX_comm_get_dst_proc(simcall->comm_get_dst_proc.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+ case SIMCALL_COMM_IS_LATENCY_BOUNDED:
+ simcall->comm_is_latency_bounded.result =
+ SIMIX_comm_is_latency_bounded(simcall->comm_is_latency_bounded.comm);
+ SIMIX_simcall_answer(simcall);
+ break;
+#endif
+
+ case SIMCALL_RDV_CREATE:
+ simcall->rdv_create.result = SIMIX_rdv_create(simcall->rdv_create.name);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_RDV_DESTROY:
+ SIMIX_rdv_destroy(simcall->rdv_destroy.rdv);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_RDV_GEY_BY_NAME:
+ simcall->rdv_get_by_name.result =
+ SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_RDV_COMM_COUNT_BY_HOST:
+ simcall->rdv_comm_count_by_host.result = SIMIX_rdv_comm_count_by_host(
+ simcall->rdv_comm_count_by_host.rdv,
+ simcall->rdv_comm_count_by_host.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_RDV_GET_HEAD:
+ simcall->rdv_get_head.result = SIMIX_rdv_get_head(simcall->rdv_get_head.rdv);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_BY_NAME:
+ simcall->host_get_by_name.result =
+ SIMIX_host_get_by_name(simcall->host_get_by_name.name);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_NAME:
+ simcall->host_get_name.result = SIMIX_host_get_name(simcall->host_get_name.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_PROPERTIES:
+ simcall->host_get_properties.result =
+ SIMIX_host_get_properties(simcall->host_get_properties.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_SPEED:
+ simcall->host_get_speed.result =
+ SIMIX_host_get_speed(simcall->host_get_speed.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_AVAILABLE_SPEED:
+ simcall->host_get_available_speed.result =
+ SIMIX_host_get_available_speed(simcall->host_get_available_speed.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_STATE:
+ simcall->host_get_state.result =
+ SIMIX_host_get_state(simcall->host_get_state.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_GET_DATA:
+ simcall->host_get_data.result = SIMIX_host_get_data(simcall->host_get_data.host);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_SET_DATA:
+ SIMIX_host_set_data(simcall->host_set_data.host, simcall->host_set_data.data);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTE:
+ simcall->host_execute.result = SIMIX_host_execute(
+ simcall->host_execute.name,
+ simcall->host_execute.host,
+ simcall->host_execute.computation_amount,
+ simcall->host_execute.priority);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_PARALLEL_EXECUTE:
+ simcall->host_parallel_execute.result = SIMIX_host_parallel_execute(
+ simcall->host_parallel_execute.name,
+ simcall->host_parallel_execute.host_nb,
+ simcall->host_parallel_execute.host_list,
+ simcall->host_parallel_execute.computation_amount,
+ simcall->host_parallel_execute.communication_amount,
+ simcall->host_parallel_execute.amount,
+ simcall->host_parallel_execute.rate);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTION_DESTROY:
+ SIMIX_host_execution_destroy(simcall->host_execution_destroy.execution);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTION_CANCEL:
+ SIMIX_host_execution_cancel(simcall->host_execution_cancel.execution);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTION_GET_REMAINS:
+ simcall->host_execution_get_remains.result =
+ SIMIX_host_execution_get_remains(simcall->host_execution_get_remains.execution);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTION_GET_STATE:
+ simcall->host_execution_get_state.result =
+ SIMIX_host_execution_get_state(simcall->host_execution_get_state.execution);
+ SIMIX_simcall_answer(simcall);
+ break;
+
+ case SIMCALL_HOST_EXECUTION_SET_PRIORITY: