Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make visible the MSG_task_get variant accepting both an host and a timeout
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 19 Nov 2007 20:13:15 +0000 (20:13 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 19 Nov 2007 20:13:15 +0000 (20:13 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5062 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/msg/msg.h
src/msg/gos.c

index 197d78e..1424a4c 100644 (file)
@@ -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,
 
 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, 
 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,
 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,
index b4ac1d9..82ce8e6 100644 (file)
@@ -19,12 +19,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg,
  *  by an agent for handling some task.
  */
 
  *  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();
 {
 
   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)
 {
                                       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
 }
 
 /** \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)
 {
 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
 }
 
 /** \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
 
 /** \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
  *
  * It takes three parameters:
  * \param channel the channel on which the agent should be