Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Messages which the payload datatype descriptor is NULL contain 0 bytes as payload...
[simgrid.git] / src / msg / task.c
index c353d75..b6c608a 100644 (file)
@@ -90,6 +90,17 @@ m_process_t MSG_task_get_sender(m_task_t task)
    return ((simdata_task_t) task->simdata)->sender;
 }
 
+/** \ingroup m_task_management
+ * \brief Return the source of a #m_task_t.
+ *
+ * This functions returns the #m_host_t from which this task was sent
+ */
+m_host_t MSG_task_get_source(m_task_t task)
+{
+   xbt_assert0(task, "Invalid parameters");
+   return ((simdata_task_t) task->simdata)->source;
+}
+
 /** \ingroup m_task_management
  * \brief Return the name of a #m_task_t.
  *