Sfoglia il codice sorgente

also use _starpu_pthread types in mpi

Samuel Thibault 13 anni fa
parent
commit
14ee047c13
2 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 5 5
      mpi/src/starpu_mpi.c
  2. 2 2
      mpi/src/starpu_mpi_private.h

+ 5 - 5
mpi/src/starpu_mpi.c

@@ -44,18 +44,18 @@ static struct _starpu_mpi_req_list *new_requests;
 
 /* The list of detached requests that have already been submitted to MPI */
 static struct _starpu_mpi_req_list *detached_requests;
-static pthread_mutex_t detached_requests_mutex;
+static _starpu_pthread_mutex_t detached_requests_mutex;
 
 /* Condition to wake up progression thread */
-static pthread_cond_t cond_progression;
+static _starpu_pthread_cond_t cond_progression;
 /* Condition to wake up waiting for all current MPI requests to finish */
-static pthread_cond_t cond_finished;
-static pthread_mutex_t mutex;
+static _starpu_pthread_cond_t cond_finished;
+static _starpu_pthread_mutex_t mutex;
 static pthread_t progress_thread;
 static int running = 0;
 
 /* Count requests posted by the application and not yet submitted to MPI, i.e pushed into the new_requests list */
-static pthread_mutex_t mutex_posted_requests;
+static _starpu_pthread_mutex_t mutex_posted_requests;
 static int posted_requests = 0, newer_requests, barrier_running = 0;
 
 #define _STARPU_MPI_INC_POSTED_REQUESTS(value) { _STARPU_PTHREAD_MUTEX_LOCK(&mutex_posted_requests); posted_requests += value; _STARPU_PTHREAD_MUTEX_UNLOCK(&mutex_posted_requests); }

+ 2 - 2
mpi/src/starpu_mpi_private.h

@@ -91,8 +91,8 @@ LIST_TYPE(_starpu_mpi_req,
 	int *flag;
 
 	int ret;
-	pthread_mutex_t req_mutex;
-	pthread_cond_t req_cond;
+	_starpu_pthread_mutex_t req_mutex;
+	_starpu_pthread_cond_t req_cond;
 
 	enum _starpu_mpi_request_type request_type; /* 0 send, 1 recv */