-/* /\* if (task->data == NULL) { *\/ */
-/* /\* WARNING("User Data uninitialized"); *\/ */
-/* /\* warning++; *\/ */
-/* /\* } *\/ */
+/** \ingroup m_task_management
+ * \brief Returns the total amount received by a task #m_task_t.
+ * If the communication does not exist it will return 0.
+ * So, if the communication has FINISHED or FAILED it returns
+ * zero.
+ */
+double MSG_task_get_remaining_communication(m_task_t task)
+{
+ xbt_assert((task != NULL)
+ && (task->simdata != NULL), "Invalid parameter");
+ XBT_DEBUG("calling SIMIX_req_communication_get_remains(%p)",
+ task->simdata->comm);
+ return SIMIX_req_comm_get_remains(task->simdata->comm);
+}