Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use std::deque instead of xbt_fifo within mailboxes
[simgrid.git] / src / msg / msg_gos.cpp
index 5329078..9632b26 100644 (file)
@@ -825,22 +825,8 @@ msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char *alia
  */
 int MSG_task_listen(const char *alias)
 {
-  smx_mailbox_t rdv = MSG_mailbox_get_by_alias(alias);
-  return !MSG_mailbox_is_empty(rdv) || (rdv->permanent_receiver && xbt_fifo_size(rdv->done_comm_fifo)!=0);
-}
-
-/** \ingroup msg_task_usage
- * \brief Check the number of communication actions of a given host pending in a mailbox.
- *
- * \param alias the name of the mailbox to be considered
- * \param host the host to check for communication
- *
- * \return Returns the number of pending communication actions of the host in the given mailbox, 0 if there is no
- *         pending communication actions.
- */
-int MSG_task_listen_from_host(const char *alias, msg_host_t host)
-{
-  return MSG_mailbox_get_count_host_waiting_tasks(MSG_mailbox_get_by_alias(alias), host);
+  smx_mailbox_t mbox = MSG_mailbox_get_by_alias(alias);
+  return !MSG_mailbox_is_empty(mbox) || (mbox->permanent_receiver && !mbox->done_comm_queue->empty());
 }
 
 /** \ingroup msg_task_usage