|
@@ -44,18 +44,18 @@ static struct _starpu_mpi_req_list *new_requests;
|
|
|
|
|
|
/* The list of detached requests that have already been submitted to MPI */
|
|
/* The list of detached requests that have already been submitted to MPI */
|
|
static struct _starpu_mpi_req_list *detached_requests;
|
|
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 */
|
|
/* 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 */
|
|
/* 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 pthread_t progress_thread;
|
|
static int running = 0;
|
|
static int running = 0;
|
|
|
|
|
|
/* Count requests posted by the application and not yet submitted to MPI, i.e pushed into the new_requests list */
|
|
/* 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;
|
|
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); }
|
|
#define _STARPU_MPI_INC_POSTED_REQUESTS(value) { _STARPU_PTHREAD_MUTEX_LOCK(&mutex_posted_requests); posted_requests += value; _STARPU_PTHREAD_MUTEX_UNLOCK(&mutex_posted_requests); }
|