+/**
+ * \brief This function is called by SIMIX to copy the data of a comm.
+ * \param comm the comm
+ * \param buff the data copied
+ * \param buff_size size of the buffer
+ */
+void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_size) {
+
+ // copy the task
+ SIMIX_comm_copy_pointer_callback(comm, buff, buff_size);
+
+ // notify the user callback if any
+ if (msg_global->task_copy_callback) {
+ m_task_t task = buff;
+ msg_global->task_copy_callback(task,
+ simcall_comm_get_src_proc(comm), simcall_comm_get_dst_proc(comm));
+ }
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param task
+ * \param alias
+ * \return
+ */
+MSG_error_t MSG_task_send(m_task_t task, const char *alias)
+{
+ XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias);
+ return MSG_task_send_with_timeout(task, alias, -1);
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param task
+ * \param alias
+ * \param maxrate
+ * \return
+ */
+MSG_error_t
+MSG_task_send_bounded(m_task_t task, const char *alias, double maxrate)
+{
+ task->simdata->rate = maxrate;
+ return MSG_task_send(task, alias);
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param task
+ * \param alias
+ * \param timeout
+ * \return
+ */
+MSG_error_t
+MSG_task_send_with_timeout(m_task_t task, const char *alias,
+ double timeout)
+{
+ return MSG_mailbox_put_with_timeout(MSG_mailbox_get_by_alias(alias),
+ task, timeout);
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param alias
+ * \return
+ */
+int MSG_task_listen(const char *alias)
+{
+ CHECK_HOST();
+
+ return !MSG_mailbox_is_empty(MSG_mailbox_get_by_alias(alias));
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param alias
+ * \param host
+ * \return
+ */
+int MSG_task_listen_from_host(const char *alias, m_host_t host)
+{
+ CHECK_HOST();
+
+ return
+ MSG_mailbox_get_count_host_waiting_tasks(MSG_mailbox_get_by_alias
+ (alias), host);
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Description forthcoming (FIXME)
+ *
+ * \param alias
+ * \return
+ */
+int MSG_task_listen_from(const char *alias)
+{
+ m_task_t task;
+
+ CHECK_HOST();
+
+ if (NULL ==
+ (task = MSG_mailbox_get_head(MSG_mailbox_get_by_alias(alias))))
+ return -1;
+
+ return MSG_process_get_PID(task->simdata->sender);
+}
+
+#ifdef MSG_USE_DEPRECATED
+/** \ingroup msg_gos_functions
+ *
+ * \brief Return the last value returned by a MSG function (except
+ * MSG_get_errno...).
+ */
+MSG_error_t MSG_get_errno(void)
+{
+ return PROCESS_GET_ERRNO();
+}
+