-/* $Id$ */
-
-/* Copyright (c) 2007 Arnaud Legrand, Bruno Donnassolo.
- All rights reserved. */
+/* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* initialize them */
act->name = xbt_strdup(name);
act->source = sender;
-
+#ifdef HAVE_TRACING
+ act->category = NULL;
+#endif
act->surf_action =
surf_workstation_model->extension.workstation.communicate(sender->host,
/* initialize them */
act->source = host;
act->name = xbt_strdup(name);
+#ifdef HAVE_TRACING
+ act->category = NULL;
+#endif
/* set communication */
act->surf_action =
surf_workstation_model->action_data_set(act->surf_action, act);
DEBUG1("Create execute action %p", act);
+#ifdef HAVE_TRACING
+ TRACE_smx_action_execute (act);
+#endif
return act;
}
/* initialize them */
act->source = host;
act->name = xbt_strdup(name);
+#ifdef HAVE_TRACING
+ act->category = NULL;
+#endif
act->surf_action =
surf_workstation_model->extension.workstation.sleep(host->host, duration);
return;
}
+/**
+ * \brief Resumes the execution of an action.
+ *
+ * This functions restarts the execution of an action. It just calls the right SURF function.
+ * \param action The SIMIX action
+ * \param priority The new priority
+ */
+XBT_INLINE void SIMIX_action_resume(smx_action_t action)
+{
+ xbt_assert0((action != NULL), "Invalid parameter");
+
+ surf_workstation_model->resume(action->surf_action);
+ return;
+}
+
+/**
+ * \brief Suspends the execution of an action.
+ *
+ * This functions suspends the execution of an action. It just calls the right SURF function.
+ * \param action The SIMIX action
+ * \param priority The new priority
+ */
+XBT_INLINE void SIMIX_action_suspend(smx_action_t action)
+{
+ xbt_assert0((action != NULL), "Invalid parameter");
+
+ surf_workstation_model->suspend(action->surf_action);
+ return;
+}
+
/**
* \brief Destroys an action
*
if (action->surf_action)
action->surf_action->model_type->action_unref(action->surf_action);
-
+#ifdef HAVE_TRACING
+ TRACE_smx_action_destroy (action);
+#endif
xbt_free(action);
return 1;
}
/* initialize them */
act->name = xbt_strdup(name);
+#ifdef HAVE_TRACING
+ act->category = NULL;
+#endif
/* set action */