Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Display neat exceptions backtraces
[simgrid.git] / src / msg / task.c
index c353d75..e5dda01 100644 (file)
@@ -8,8 +8,6 @@
 #include "private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(task, msg,
-                               "Logging specific to MSG (task)");
 
 /** \defgroup m_task_management Managing functions of Tasks
  *  \brief This section describes the task structure of MSG
@@ -90,6 +88,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.
  *