Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
inline static functions declared only once, and that were not really improving my...
[simgrid.git] / src / msg / gos.c
index 7d929e1..0d8fa5f 100644 (file)
@@ -437,8 +437,12 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al
  * \brief Sends a task on a mailbox.
  *
  * This is a non blocking detached send function.
- * Think of it as a best effort send. The communication
- * object will be destroyed by the receiver (if any).
+ * Think of it as a best effort send. Keep in mind that the third parameter
+ * is only called if the communication fails. If the communication does work,
+ * it is responsibility of the receiver code to free anything related to
+ * the task, as usual. More details on this can be obtained on
+ * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
+ * in the SimGrid-user mailing list archive.
  *
  * \param task a #m_task_t to send on another location.
  * \param alias name of the mailbox to sent the task to
@@ -486,9 +490,9 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
  * \param name of the mailbox to receive the task on
  * \return the msg_comm_t communication created
  */
-msg_comm_t MSG_task_irecv(m_task_t *task, const char *alias)
+msg_comm_t MSG_task_irecv(m_task_t *task, const char *name)
 {
-  smx_rdv_t rdv = MSG_mailbox_get_by_alias(alias);
+  smx_rdv_t rdv = MSG_mailbox_get_by_alias(name);
 
   CHECK_HOST();
 
@@ -623,9 +627,7 @@ void MSG_comm_destroy(msg_comm_t comm)
     (*comm->task_received)->simdata->isused = 0;
   }
 
-  /* FIXME auto-destroy comms from SIMIX to avoid this request */
-  /*SIMIX_req_comm_destroy(comm->s_comm);*/
-  free(comm);
+  xbt_free(comm);
 }
 
 /** \ingroup msg_gos_functions