X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/78e6d82818b5b5fcfb29e84da291e69073b18b55..872e6c960cfd42bfbb748574c0cf88693d0730a5:/src/msg/gos.c diff --git a/src/msg/gos.c b/src/msg/gos.c index feb7153b6d..9041afd174 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -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. */ - 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); + 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) @@ -215,6 +219,12 @@ MSG_error_t MSG_task_put(m_task_t task, 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) @@ -346,4 +356,3 @@ MSG_error_t MSG_get_errno(void) { return PROCESS_GET_ERRNO(); } -