Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add wrapper to match receiving mailboxes against a user-provided filter
[simgrid.git] / src / simix / smx_network.c
index e6a26c6..a795bd2 100644 (file)
@@ -117,6 +117,10 @@ static XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm)
   comm->comm.rdv = NULL;
 }
 
+smx_action_t SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data) {
+   return SIMIX_rdv_get_request(rdv, SIMIX_COMM_SEND, match_fun, data);
+}
+
 /**
  *  \brief Checks if there is a communication action queued in a rendez-vous matching our needs
  *  \param type The type of communication we are looking for (comm_send, comm_recv)
@@ -197,7 +201,8 @@ void SIMIX_comm_destroy(smx_action_t action)
   XBT_DEBUG("Destroy action %p (refcount:%d)", action, action->comm.refcount);
 
   if (action->comm.refcount <= 0)
-    xbt_die(bprintf("the refcount of comm %p is already 0 before decreasing it. That's a bug!",action));
+    xbt_die("the refcount of comm %p is already 0 before decreasing it. "
+            "That's a bug!", action);
 
   action->comm.refcount--;
   if (action->comm.refcount > 0)