X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a2102287f9953ee825e0fce70d3aaa7a2e851493..444fd32bb5976fd3fd81197e6c321f21a5ed34b2:/src/msg/task.c diff --git a/src/msg/task.c b/src/msg/task.c index c353d75047..84d6f90b38 100644 --- a/src/msg/task.c +++ b/src/msg/task.c @@ -8,13 +8,12 @@ #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 * (#m_task_t) and the functions for managing it. - * + * \htmlonly \endhtmlonly + * * Since most scheduling algorithms rely on a concept of task * that can be either computed locally or * transferred on another processor, it seems to be the @@ -90,6 +89,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. *