* Kill the MSG_paje_output() function. It's a noop since 2 years.
* Kill MSG_WARNING and MSG_FATAL return codes: they were not used
anywere in source.
+ * Add a MSG_task_set_data() function
SIMIX:
* add a SIMIX_sem_get_capacity() function
SMPI:
double *communication_amount,
void *data);
XBT_PUBLIC(void *) MSG_task_get_data(m_task_t task);
+XBT_PUBLIC(void) MSG_task_set_data(m_task_t task,void*data);
XBT_PUBLIC(m_process_t) MSG_task_get_sender(m_task_t task);
XBT_PUBLIC(m_host_t) MSG_task_get_source(m_task_t task);
XBT_PUBLIC(const char *) MSG_task_get_name(m_task_t task);
/** \ingroup m_task_management
* \brief Return the user data of a #m_task_t.
*
- * This functions checks whether \a task is a valid pointer or not and return
+ * This function checks whether \a task is a valid pointer or not and return
the user data associated to \a task if it is possible.
*/
void *MSG_task_get_data(m_task_t task)
return (task->data);
}
+/** \ingroup m_task_management
+ * \brief Sets the user data of a #m_task_t.
+ *
+ * This function allows to associate a new pointer to
+ the user data associated of \a task.
+ */
+void MSG_task_set_data(m_task_t task,void *data)
+{
+ xbt_assert0((task != NULL), "Invalid parameter");
+
+ task->data = data;
+}
+
/** \ingroup m_task_management
* \brief Return the sender of a #m_task_t.
*