SIMIX_request_push(&req);
}
-#ifdef HAVE_TRACING
-/**
- * \brief Set the category of an execution action.
- *
- * This functions changes the priority only. It calls a surf function.
- * \param execution The execution action
- * \param priority The new priority
- */
-void SIMIX_req_host_execution_set_category(smx_action_t execution, const char *category)
-{
- s_smx_req_t req;
-
- req.call = REQ_HOST_EXECUTION_SET_CATEGORY;
- req.host_execution_set_category.execution = execution;
- req.host_execution_set_category.category = xbt_strdup (category);
- SIMIX_request_push(&req);
-}
-#endif
-
/**
* \brief Waits for the completion of an execution action.
*
}
smx_action_t SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size, double rate,
- void *src_buff, size_t src_buff_size, void *data)
+ void *src_buff, size_t src_buff_size,
+ int (*match_fun)(void *, void *), void *data)
{
s_smx_req_t req;
req.comm_isend.rate = rate;
req.comm_isend.src_buff = src_buff;
req.comm_isend.src_buff_size = src_buff_size;
+ req.comm_isend.match_fun = match_fun;
req.comm_isend.data = data;
SIMIX_request_push(&req);
return req.comm_isend.result;
}
-smx_action_t SIMIX_req_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size)
+smx_action_t SIMIX_req_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+ int (*match_fun)(void *, void *), void *data)
{
s_smx_req_t req;
req.comm_irecv.rdv = rdv;
req.comm_irecv.dst_buff = dst_buff;
req.comm_irecv.dst_buff_size = dst_buff_size;
+ req.comm_irecv.match_fun = match_fun;
+ req.comm_irecv.data = data;
SIMIX_request_push(&req);
return req.comm_irecv.result;
if (xbt_dynar_length(comms)==0)
return -1;
- WARN0("SIMIX_comm_testany is not implemented yet. Using waitany instead. This changes the semantic...");
- req.call = REQ_COMM_WAITANY;
- req.comm_waitany.comms = comms;
+ req.call = REQ_COMM_TESTANY;
+ req.comm_testany.comms = comms;
SIMIX_request_push(&req);
- return req.comm_waitany.result;
+ return req.comm_testany.result;
}
void SIMIX_req_comm_wait(smx_action_t comm, double timeout)
SIMIX_request_push(&req);
}
+#ifdef HAVE_TRACING
+/**
+ * \brief Set the category of an action.
+ *
+ * This functions changes the category only. It calls a surf function.
+ * \param execution The execution action
+ * \param category The tracing category
+ */
+void SIMIX_req_set_category(smx_action_t action, const char *category)
+{
+ s_smx_req_t req;
+
+ req.call = REQ_SET_CATEGORY;
+ req.set_category.action = action;
+ req.set_category.category = category;
+
+ SIMIX_request_push(&req);
+}
+#endif
+
int SIMIX_req_comm_test(smx_action_t comm)
{
s_smx_req_t req;
return req.comm_get_state.result;
}
-void *SIMIX_req_comm_get_data(smx_action_t comm)
+void *SIMIX_req_comm_get_src_data(smx_action_t comm)
+{
+ s_smx_req_t req;
+
+ req.call = REQ_COMM_GET_SRC_DATA;
+ req.comm_get_src_data.comm = comm;
+
+ SIMIX_request_push(&req);
+ return req.comm_get_src_data.result;
+}
+
+void *SIMIX_req_comm_get_dst_data(smx_action_t comm)
{
s_smx_req_t req;
- req.call = REQ_COMM_GET_DATA;
- req.comm_get_data.comm = comm;
+ req.call = REQ_COMM_GET_DST_DATA;
+ req.comm_get_dst_data.comm = comm;
SIMIX_request_push(&req);
- return req.comm_get_data.result;
+ return req.comm_get_dst_data.result;
}
void *SIMIX_req_comm_get_src_buff(smx_action_t comm)