X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8927eb822dce4bffe473d272e506e03435cee833..5dc86ff6da450ced640b10645791bf9e5273448b:/src/simix/smx_process.c diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index 8eed30e499..65788507ca 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -15,6 +15,20 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, static unsigned long simix_process_count = 0; +/** + * \brief Returns the current agent. + * + * This functions returns the currently running SIMIX process. + * + * \return The SIMIX process + */ +XBT_INLINE smx_process_t SIMIX_process_self(void) +{ + if(simix_global) + return SIMIX_context_self(); + return NULL; +} + /** * \brief Move a process to the list of processes to destroy. */ @@ -478,20 +492,6 @@ void SIMIX_process_sleep_resume(smx_action_t action) surf_workstation_model->resume(action->sleep.surf_sleep); } -/** - * \brief Returns the current agent. - * - * This functions returns the currently running SIMIX process. - * - * \return The SIMIX process - */ -XBT_INLINE smx_process_t SIMIX_process_self(void) -{ - if(simix_global) - return SIMIX_context_self(); - return NULL; -} - /** * Calling this function makes the process to yield. * Only the processes can call this function, giving back the control to maestro