X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/07c319ec54d6fc778ee3cc5e75a747242006723e..f21c4fc3d7f78879f3ecac4dff751e4888dcac06:/src/msg/gos.c diff --git a/src/msg/gos.c b/src/msg/gos.c index bb22ab20ac..899b135a5e 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -66,6 +66,9 @@ MSG_error_t MSG_task_execute(m_task_t task) SIMIX_req_host_execute(task->name, SIMIX_host_self(), simdata->computation_amount); SIMIX_req_host_execution_set_priority(simdata->compute, simdata->priority); +#ifdef HAVE_TRACING + SIMIX_req_set_category(simdata->compute, task->category); +#endif self->simdata->waiting_action = simdata->compute; SIMIX_req_host_execution_wait(simdata->compute); @@ -495,7 +498,6 @@ MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout) task = (m_task_t) SIMIX_req_comm_get_src_buff(comm); task->simdata->refcount--; } - SIMIX_req_comm_destroy(comm); /* FIXME: these functions are not tracable */ } @@ -546,6 +548,18 @@ int MSG_comm_waitany(xbt_dynar_t comms) return SIMIX_req_comm_waitany(comms); } +/** \ingroup msg_gos_functions +* \brief This function wait for the first completed communication +* +* It takes on parameter. +* \param comms a vector of communication +* \return the position of the completed communication, if any, or -1 if none was completed +*/ +int MSG_comm_testany(xbt_dynar_t comms) +{ + return SIMIX_req_comm_testany(comms); +} + m_task_t MSG_comm_get_task(msg_comm_t comm) { xbt_assert0(comm, "Invalid parameters");