Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add MSG_task_has_data function
authorcoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 10:13:26 +0000 (10:13 +0000)
committercoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Mar 2010 10:13:26 +0000 (10:13 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7365 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/task.c

index 6d4bbbf..acdfaca 100644 (file)
@@ -271,3 +271,18 @@ void MSG_task_set_priority(m_task_t task, double priority)
     SIMIX_action_set_priority(task->simdata->compute,
                               task->simdata->priority);
 }
+
+
+/** \ingroup m_task_management
+ * \brief Sets the user data of a #m_task_t.
+ *
+ * This function allows to test if a task contains a not_null data
+ * return 1 (if true)
+ */
+int MSG_task_has_data(m_task_t task)
+{
+
+ return (task->data != NULL);
+
+}
+