X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4263281a2286d2509215da95b78d72ad3cbbc6ed..cf56a22da60094d8e7f14b1457526dc194d40226:/src/smpi/smpi_global.c?ds=sidebyside diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index d285a00b33..d9da58990c 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -168,10 +168,6 @@ void smpi_global_init() smpi_global->timer_mutex = SIMIX_mutex_init(); smpi_global->timer_cond = SIMIX_cond_init(); - smpi_global->execute_mutex = SIMIX_mutex_init(); - smpi_global->execute_cond = SIMIX_cond_init(); - smpi_global->execute_count = 0; - smpi_global->do_once_duration_nodes = NULL; smpi_global->do_once_duration = NULL; smpi_global->do_once_mutex = SIMIX_mutex_init(); @@ -213,8 +209,6 @@ void smpi_global_destroy() xbt_os_timer_free(smpi_global->timer); SIMIX_mutex_destroy(smpi_global->timer_mutex); SIMIX_cond_destroy(smpi_global->timer_cond); - SIMIX_mutex_destroy(smpi_global->execute_mutex); - SIMIX_cond_destroy(smpi_global->execute_cond); for(curr = smpi_global->do_once_duration_nodes; NULL != curr; curr = next) { next = curr->next; @@ -249,10 +243,23 @@ int smpi_host_index() { smx_host_t host = SIMIX_host_self(); smpi_host_data_t hdata = (smpi_host_data_t)SIMIX_host_get_data(host); - return hdata->index; } +smx_mutex_t smpi_host_mutex() +{ + smx_host_t host = SIMIX_host_self(); + smpi_host_data_t hdata = (smpi_host_data_t)SIMIX_host_get_data(host); + return hdata->mutex; +} + +smx_cond_t smpi_host_cond() +{ + smx_host_t host = SIMIX_host_self(); + smpi_host_data_t hdata = (smpi_host_data_t)SIMIX_host_get_data(host); + return hdata->cond; +} + int smpi_run_simulation(int *argc, char **argv) { smx_cond_t cond = NULL;