-/** \ingroup msg_gos_functions
- * \brief Listen on \a channel and waits for receiving a task from \a host.
- *
- * It takes three parameters.
- * \param task a memory location for storing a #m_task_t. It will
- hold a task when this function will return. Thus \a task should not
- be equal to \c NULL and \a *task should be equal to \c NULL. If one of
- those two condition does not hold, there will be a warning message.
- * \param channel the channel on which the agent should be
- listening. This value has to be >=0 and < than the maximal
- number of channels fixed with MSG_set_channel_number().
- * \param host the host that is to be watched.
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
- */
-MSG_error_t
-MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host)
-{
- return MSG_task_get_ext(task, channel, -1, host);
-}
-
-/** \ingroup msg_gos_functions
- * \brief Listen on a channel and wait for receiving a task.
- *
- * It takes two parameters.
- * \param task a memory location for storing a #m_task_t. It will
- hold a task when this function will return. Thus \a task should not
- be equal to \c NULL and \a *task should be equal to \c NULL. If one of
- those two condition does not hold, there will be a warning message.
- * \param channel the channel on which the agent should be
- listening. This value has to be >=0 and < than the maximal
- number of channels fixed with MSG_set_channel_number().
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
- */
-MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
-{
- return MSG_task_get_with_timeout(task, channel, -1);
-}
-
-/** \ingroup msg_gos_functions
- * \brief Listen on a channel and wait for receiving a task with a timeout.
- *
- * It takes three parameters.
- * \param task a memory location for storing a #m_task_t. It will
- hold a task when this function will return. Thus \a task should not
- be equal to \c NULL and \a *task should be equal to \c NULL. If one of
- those two condition does not hold, there will be a warning message.
- * \param channel the channel on which the agent should be
- listening. This value has to be >=0 and < than the maximal
- number of channels fixed with MSG_set_channel_number().
- * \param max_duration the maximum time to wait for a task before giving
- up. In such a case, #MSG_TRANSFER_FAILURE will be returned, \a task
- will not be modified and will still be
- equal to \c NULL when returning.
- * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
- */
-MSG_error_t
-MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel,
- double max_duration)
-{
- return MSG_task_get_ext(task, channel, max_duration, NULL);
-}
-
-/** \defgroup msg_gos_functions MSG Operating System Functions
- * \brief This section describes the functions that can be used
- * by an agent for handling some task.
- */
-
-MSG_error_t
-MSG_task_get_ext(m_task_t * task, m_channel_t channel, double timeout,
- m_host_t host)
-{
- xbt_assert((channel >= 0)
- && (channel < msg_global->max_channel), "Invalid channel %d",
- channel);
-
- return
- MSG_mailbox_get_task_ext(MSG_mailbox_get_by_channel
- (MSG_host_self(), channel), task, host,
- timeout);
-}
-