Commit c81d0f75 authored by James Dinan's avatar James Dinan
Browse files

[svn-r8996] Converted MPIX_Mutex_destroy to MPI style.

parent f7069019
......@@ -23,10 +23,10 @@ int MPIX_Group_comm_create(MPI_Comm old_comm, MPI_Group group, int tag, MPI_Comm
struct mpixi_mutex_s;
typedef struct mpixi_mutex_s * MPIX_Mutex;
int MPIX_Mutex_create (int count, MPI_Comm comm, MPIX_Mutex *hdl);
int MPIX_Mutex_destroy(MPIX_Mutex hdl);
int MPIX_Mutex_lock (MPIX_Mutex hdl, int mutex, int proc);
int MPIX_Mutex_unlock (MPIX_Mutex hdl, int mutex, int proc);
int MPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl);
int MPIX_Mutex_free (MPIX_Mutex *hdl);
int MPIX_Mutex_lock (MPIX_Mutex hdl, int mutex, int proc);
int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc);
#if defined(__cplusplus)
}
......
......@@ -95,12 +95,13 @@ int MPIX_Mutex_create(int my_count, MPI_Comm comm, MPIX_Mutex *hdl_out) {
}
/** Destroy a group of MPI mutexes. Collective.
/** Free a group of MPI mutexes. Collective.
*
* @param[in] hdl Handle to the group that should be destroyed.
* @return Zero on success, non-zero otherwise.
*/
int MPIX_Mutex_destroy(MPIX_Mutex hdl) {
int MPIX_Mutex_free(MPIX_Mutex *hdl_ptr) {
MPIX_Mutex hdl = *hdl_ptr;
int i;
for (i = 0; i < hdl->max_count; i++) {
......@@ -116,6 +117,7 @@ int MPIX_Mutex_destroy(MPIX_Mutex hdl) {
MPI_Comm_free(&hdl->comm);
free(hdl);
hdl_ptr = NULL;
return MPI_SUCCESS;
}
......
......@@ -44,7 +44,7 @@ int main(int argc, char ** argv) {
fflush(NULL);
}
MPIX_Mutex_destroy(mtx);
MPIX_Mutex_free(&mtx);
if (rank == 0)
printf(" No Errors\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment