XBT_PUBLIC(double) SIMIX_req_host_execution_get_remains(smx_action_t execution);
XBT_PUBLIC(e_smx_state_t) SIMIX_req_host_execution_get_state(smx_action_t execution);
XBT_PUBLIC(void) SIMIX_req_host_execution_set_priority(smx_action_t execution, double priority);
-#ifdef HAVE_TRACING
-XBT_PUBLIC(void) SIMIX_req_host_execution_set_category(smx_action_t execution, const char *category);
-#endif
XBT_PUBLIC(void) SIMIX_req_host_execution_wait(smx_action_t execution);
XBT_PUBLIC(int) SIMIX_req_comm_is_latency_bounded(smx_action_t comm);
#endif
+#ifdef HAVE_TRACING
+/************************** Tracing handling **********************************/
+XBT_PUBLIC(void) SIMIX_req_set_category(smx_action_t action, const char *category);
+#endif
+
/************************** Synchro handling **********************************/
XBT_PUBLIC(smx_mutex_t) SIMIX_req_mutex_init(void);
simdata->computation_amount);
SIMIX_req_host_execution_set_priority(simdata->compute, simdata->priority);
#ifdef HAVE_TRACING
- SIMIX_req_host_execution_set_category(simdata->compute, task->category);
+ SIMIX_req_set_category(simdata->compute, task->category);
#endif
self->simdata->waiting_action = simdata->compute;
double SIMIX_host_execution_get_remains(smx_action_t action);
e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action);
void SIMIX_host_execution_set_priority(smx_action_t action, double priority);
-#ifdef HAVE_TRACING
-void SIMIX_host_execution_set_category(smx_action_t action, const char *category);
-#endif
void SIMIX_pre_host_execution_wait(smx_req_t req);
void SIMIX_host_execution_suspend(smx_action_t action);
void SIMIX_post_host_execute(smx_action_t action);
+#ifdef HAVE_TRACING
+void SIMIX_set_category(smx_action_t action, const char *category);
+#endif
+
#endif
REQ_HOST_EXECUTION_GET_REMAINS,
REQ_HOST_EXECUTION_GET_STATE,
REQ_HOST_EXECUTION_SET_PRIORITY,
-#ifdef HAVE_TRACING
- REQ_HOST_EXECUTION_SET_CATEGORY,
-#endif
REQ_HOST_EXECUTION_WAIT,
REQ_PROCESS_CREATE,
REQ_PROCESS_KILL,
REQ_COMM_GET_DST_PROC,
#ifdef HAVE_LATENCY_BOUND_TRACKING
REQ_COMM_IS_LATENCY_BOUNDED,
+#endif
+#ifdef HAVE_TRACING
+ REQ_SET_CATEGORY,
#endif
REQ_MUTEX_INIT,
REQ_MUTEX_DESTROY,
double priority;
} host_execution_set_priority;
-#ifdef HAVE_TRACING
- struct {
- smx_action_t execution;
- const char *category;
- } host_execution_set_category;
-#endif
-
struct {
smx_action_t execution;
} host_execution_wait;
} comm_is_latency_bounded;
#endif
+#ifdef HAVE_TRACING
+ struct {
+ smx_action_t action;
+ const char *category;
+ } set_category;
+#endif
+
struct {
smx_mutex_t result;
} mutex_init;
surf_workstation_model->set_priority(action->execution.surf_exec, priority);
}
-#ifdef HAVE_TRACING
-void SIMIX_host_execution_set_category(smx_action_t action, const char *category)
-{
- surf_workstation_model->set_category(action->execution.surf_exec, category);
-}
-#endif
-
void SIMIX_pre_host_execution_wait(smx_req_t req)
{
smx_action_t action = req->host_execution_wait.execution;
SIMIX_execution_finish(action);
}
+
+#ifdef HAVE_TRACING
+void SIMIX_set_category(smx_action_t action, const char *category)
+{
+ surf_workstation_model->set_category(action->execution.surf_exec, category);
+}
+#endif
+
SIMIX_request_answer(req);
break;
-#ifdef HAVE_TRACING
- case REQ_HOST_EXECUTION_SET_CATEGORY:
- SIMIX_host_execution_set_category(
- req->host_execution_set_category.execution,
- req->host_execution_set_category.category);
- SIMIX_request_answer(req);
- break;
-#endif
-
case REQ_HOST_EXECUTION_WAIT:
SIMIX_pre_host_execution_wait(req);
break;
break;
#endif
+#ifdef HAVE_TRACING
+ case REQ_SET_CATEGORY:
+ SIMIX_set_category(
+ req->set_category.action,
+ req->set_category.category);
+ SIMIX_request_answer(req);
+ break;
+#endif
+
case REQ_MUTEX_INIT:
req->mutex_init.result = SIMIX_mutex_init();
SIMIX_request_answer(req);
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.
*
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 = xbt_strdup (category);
+
+ SIMIX_request_push(&req);
+}
+#endif
+
int SIMIX_req_comm_test(smx_action_t comm)
{
s_smx_req_t req;