From 994908f535190638662797b1215506fc0664bd37 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 23 Jun 2009 15:07:27 +0000 Subject: [PATCH] Kill another useless synchronization source: no one will interupt you in simulation git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6335 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/smpi/private.h | 1 - src/smpi/smpi_base.c | 4 ---- src/smpi/smpi_global.c | 4 ---- src/smpi/smpi_receiver.c | 2 -- src/smpi/smpi_sender.c | 2 -- 5 files changed, 13 deletions(-) diff --git a/src/smpi/private.h b/src/smpi/private.h index 5f731a54f7..f3e8515c8f 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -98,7 +98,6 @@ typedef struct smpi_global_t { smx_process_t *receiver_processes; int running_hosts_count; - smx_mutex_t running_hosts_count_mutex; xbt_os_timer_t timer; smx_mutex_t timer_mutex; diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 8378556b14..813754599e 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -52,9 +52,7 @@ void smpi_init_process() int i; smpi_host_data_t hdata; - SIMIX_mutex_lock(smpi_global->running_hosts_count_mutex); smpi_global->running_hosts_count++; - SIMIX_mutex_unlock(smpi_global->running_hosts_count_mutex); // initialize some local variables host = SIMIX_host_self(); @@ -76,9 +74,7 @@ void smpi_mpi_finalize() { int i; - SIMIX_mutex_lock(smpi_global->running_hosts_count_mutex); i = --smpi_global->running_hosts_count; - SIMIX_mutex_unlock(smpi_global->running_hosts_count_mutex); SIMIX_mutex_destroy(smpi_host_mutex()); SIMIX_cond_destroy(smpi_host_cond()); diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 7d52216209..91287da123 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -153,7 +153,6 @@ void smpi_global_init() smpi_global->host_count = 0; // running hosts - smpi_global->running_hosts_count_mutex = SIMIX_mutex_init(); smpi_global->running_hosts_count = 0; // mallocators @@ -236,9 +235,6 @@ void smpi_global_destroy() xbt_free(smpi_global->sender_processes); xbt_free(smpi_global->receiver_processes); - // running hosts - SIMIX_mutex_destroy(smpi_global->running_hosts_count_mutex); - // mallocators xbt_mallocator_free(smpi_global->request_mallocator); xbt_mallocator_free(smpi_global->message_mallocator); diff --git a/src/smpi/smpi_receiver.c b/src/smpi/smpi_receiver.c index 579791161a..be029073c1 100644 --- a/src/smpi/smpi_receiver.c +++ b/src/smpi/smpi_receiver.c @@ -83,9 +83,7 @@ int smpi_receiver(int argc, char **argv) } - SIMIX_mutex_lock(smpi_global->running_hosts_count_mutex); running_hosts_count = smpi_global->running_hosts_count; - SIMIX_mutex_unlock(smpi_global->running_hosts_count_mutex); } while (0 < running_hosts_count); diff --git a/src/smpi/smpi_sender.c b/src/smpi/smpi_sender.c index 0d2c433ab6..f8f9aa92f7 100644 --- a/src/smpi/smpi_sender.c +++ b/src/smpi/smpi_sender.c @@ -101,9 +101,7 @@ int smpi_sender(int argc, char **argv) } - SIMIX_mutex_lock(smpi_global->running_hosts_count_mutex); running_hosts_count = smpi_global->running_hosts_count; - SIMIX_mutex_unlock(smpi_global->running_hosts_count_mutex); } while (0 < running_hosts_count); -- 2.20.1