Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
moving include/surf to src/include/surf (continued)
[simgrid.git] / src / msg / gos.c
index feb7153..9041afd 100644 (file)
@@ -14,7 +14,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gos, msg,
 /** \ingroup msg_gos_functions
  * \brief This function is now deprecated and useless. Please stop using it.
  */
 /** \ingroup msg_gos_functions
  * \brief This function is now deprecated and useless. Please stop using it.
  */
-
 MSG_error_t MSG_process_start(m_process_t process)
 {
   xbt_assert0(0,"This function is now deprecated and useless. Please stop using it.");
 MSG_error_t MSG_process_start(m_process_t process)
 {
   xbt_assert0(0,"This function is now deprecated and useless. Please stop using it.");
@@ -90,6 +89,11 @@ MSG_error_t MSG_task_get(m_task_t * task,
     state=surf_workstation_resource->common_public->action_get_state(t_simdata->comm);
   } while (state==SURF_ACTION_RUNNING);
 
     state=surf_workstation_resource->common_public->action_get_state(t_simdata->comm);
   } while (state==SURF_ACTION_RUNNING);
 
+  if(t->simdata->using>1) {
+    xbt_fifo_unshift(msg_global->process_to_run,process);
+    xbt_context_yield();
+  }
+
   if(state == SURF_ACTION_DONE) MSG_RETURN(MSG_OK);
   else if(surf_workstation_resource->extension_public->get_state(h_simdata->host) 
          == SURF_CPU_OFF)
   if(state == SURF_ACTION_DONE) MSG_RETURN(MSG_OK);
   else if(surf_workstation_resource->extension_public->get_state(h_simdata->host) 
          == SURF_CPU_OFF)
@@ -215,6 +219,12 @@ MSG_error_t MSG_task_put(m_task_t task,
   else MSG_RETURN(MSG_TRANSFER_FAILURE);
 }
 
   else MSG_RETURN(MSG_TRANSFER_FAILURE);
 }
 
+/** \ingroup msg_gos_functions
+ * \brief Does exactly the same as MSG_task_put but with a bounded transmition 
+ * rate.
+ *
+ * \sa MSG_task_put
+ */
 MSG_error_t MSG_task_put_bounded(m_task_t task,
                                 m_host_t dest, m_channel_t channel,
                                 long double max_rate)
 MSG_error_t MSG_task_put_bounded(m_task_t task,
                                 m_host_t dest, m_channel_t channel,
                                 long double max_rate)
@@ -346,4 +356,3 @@ MSG_error_t MSG_get_errno(void)
 {
   return PROCESS_GET_ERRNO();
 }
 {
   return PROCESS_GET_ERRNO();
 }
-