X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/21e348c392c2b7a818d7cd938d35c0bbc3f26922..6760cb07d6b57be16928d95339d71e57c4e24f36:/src/simix/smx_action.c diff --git a/src/simix/smx_action.c b/src/simix/smx_action.c index 7984882150..73867517d0 100644 --- a/src/simix/smx_action.c +++ b/src/simix/smx_action.c @@ -1,7 +1,5 @@ -/* $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. */ @@ -184,6 +182,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 *