From: mquinson Date: Mon, 19 Nov 2007 20:13:15 +0000 (+0000) Subject: make visible the MSG_task_get variant accepting both an host and a timeout X-Git-Tag: v3.3~781 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1906319f3340a70c04f334e2b5b35219b0cc7ae6 make visible the MSG_task_get variant accepting both an host and a timeout git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5062 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/msg/msg.h b/include/msg/msg.h index 197d78e175..1424a4c20a 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -102,9 +102,13 @@ XBT_PUBLIC(MSG_error_t) MSG_task_destroy(m_task_t task); XBT_PUBLIC(MSG_error_t) MSG_task_get(m_task_t * task, m_channel_t channel); XBT_PUBLIC(MSG_error_t) MSG_task_get_with_time_out(m_task_t * task, m_channel_t channel, - double max_duration); + double max_duration); XBT_PUBLIC(MSG_error_t) MSG_task_get_from_host(m_task_t * task, int channel, - m_host_t host); + m_host_t host); +XBT_PUBLIC(MSG_error_t) MSG_task_get_ext(m_task_t * task, int channel, + double max_duration, m_host_t host); + + XBT_PUBLIC(MSG_error_t) MSG_task_put(m_task_t task, m_host_t dest, m_channel_t channel); XBT_PUBLIC(MSG_error_t) MSG_task_put_bounded(m_task_t task, diff --git a/src/msg/gos.c b/src/msg/gos.c index b4ac1d913a..82ce8e6630 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -19,12 +19,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, * by an agent for handling some task. */ -static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task, - m_channel_t - channel, - double - max_duration, - m_host_t host) +MSG_error_t MSG_task_get_ext(m_task_t * task, + m_channel_t channel, + double max_duration, + m_host_t host) { m_process_t process = MSG_process_self(); @@ -208,8 +206,7 @@ MSG_error_t MSG_task_get_with_time_out(m_task_t * task, m_channel_t channel, double max_duration) { - return __MSG_task_get_with_time_out_from_host(task, channel, - max_duration, NULL); + return MSG_task_get_ext(task, channel, max_duration, NULL); } /** \ingroup msg_gos_functions @@ -230,7 +227,7 @@ MSG_error_t MSG_task_get_with_time_out(m_task_t * task, MSG_error_t MSG_task_get_from_host(m_task_t * task, int channel, m_host_t host) { - return __MSG_task_get_with_time_out_from_host(task, channel, -1, host); + return MSG_task_get_ext(task, channel, -1, host); } /** \ingroup msg_gos_functions @@ -290,8 +287,9 @@ int MSG_task_probe_from(m_channel_t channel) /** \ingroup msg_gos_functions * \brief Wait for at most \a max_duration second for a task reception - on \a channel. *\a PID is updated with the PID of the first process - that triggered this event if any. + on \a channel. + + * \a PID is updated with the PID of the first process that triggered this event if any. * * It takes three parameters: * \param channel the channel on which the agent should be