X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9a17ee50f5ac1e197040595cbf31dedb6dda5ab6..1d83762040b2315fb5f9944708416945cec72f68:/src/simix/smx_action.c diff --git a/src/simix/smx_action.c b/src/simix/smx_action.c index 7984882150..b4a3b67921 100644 --- a/src/simix/smx_action.c +++ b/src/simix/smx_action.c @@ -184,6 +184,36 @@ XBT_INLINE void SIMIX_action_set_priority(smx_action_t action, double priority) 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 *