task->data = data;
}
+/** \ingroup m_task_management
+ * \brief Sets a function to be called when a task has just been copied.
+ * \param callback a callback function
+ */
+void MSG_task_set_copy_callback(void (*callback)
+ (m_task_t task, m_process_t sender, m_process_t receiver)) {
+
+ msg_global->task_copy_callback = callback;
+
+ if (callback) {
+ SIMIX_comm_set_copy_data_callback(MSG_comm_copy_data_from_SIMIX);
+ }
+ else {
+ SIMIX_comm_set_copy_data_callback(SIMIX_comm_copy_pointer_callback);
+ }
+}
+
/** \ingroup m_task_management
* \brief Return the sender of a #m_task_t.
*