From: mquinson Date: Tue, 23 Mar 2010 21:49:36 +0000 (+0000) Subject: Fix the commit introducing MSG_task_ref by actually introducing it, not only its... X-Git-Tag: SVN~401 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/06aaaaffb5ec865a880e32dcff6768792ce78446?hp=57e127e1d35b1dad0498e3f0c3ee36efc05b78a7 Fix the commit introducing MSG_task_ref by actually introducing it, not only its prototype git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7339 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/msg/task.c b/src/msg/task.c index 067793cb7f..8aae84d883 100644 --- a/src/msg/task.c +++ b/src/msg/task.c @@ -76,6 +76,11 @@ m_task_t MSG_task_create(const char *name, double compute_duration, return task; } +/** prevent the task from being destroyed too quickly (but also prevent it from being sent). Mainly useful in bindings */ +void MSG_task_ref(m_task_t t) { + t->simdata->refcount++; +} + /** \ingroup m_task_management * \brief Return the user data of a #m_task_t. *