Commit a6fb4d63 authored by William Gropp's avatar William Gropp
Browse files

[svn-r3177] Switch to the new macro for the global thread critical section...

[svn-r3177] Switch to the new macro for the global thread critical section (most of this is an automated change, tested against the MPICH2 test suite)
parent 07f99dbc
......@@ -71,7 +71,7 @@ int MPI_Group_excl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_EXCL);
/* Validate parameters, especially handles needing to be converted */
# ifdef HAVE_ERROR_CHECKING
......@@ -151,7 +151,7 @@ int MPI_Group_excl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_EXCL);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -57,7 +57,7 @@ int MPI_Group_free(MPI_Group *group)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_FREE);
/* Validate parameters, especially handles needing to be converted */
......@@ -113,7 +113,7 @@ int MPI_Group_free(MPI_Group *group)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_FREE);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -67,7 +67,7 @@ int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_INCL);
/* Validate parameters, especially handles needing to be converted */
......@@ -132,7 +132,7 @@ int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_INCL);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -68,7 +68,7 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgro
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_INTERSECTION);
/* Validate parameters, especially handles needing to be converted */
......@@ -167,7 +167,7 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgro
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_INTERSECTION);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -74,7 +74,7 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_RANGE_EXCL);
/* Validate parameters, especially handles needing to be converted */
......@@ -186,7 +186,7 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_RANGE_EXCL);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -69,7 +69,7 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_RANGE_INCL);
/* Validate parameters, especially handles needing to be converted */
......@@ -159,7 +159,7 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_RANGE_INCL);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -70,7 +70,7 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
/* The routines that setup the group data structures must be executed
within a mutex. As most of the group routines are not performance
critical, we simple run these routines within the SINGLE_CS */
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_TRANSLATE_RANKS);
/* Validate parameters, especially handles needing to be converted */
......@@ -175,7 +175,7 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_TRANSLATE_RANKS);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -63,7 +63,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("group");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_UNION);
/* Validate parameters, especially handles needing to be converted */
......@@ -197,7 +197,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_UNION);
MPIU_THREAD_SINGLE_CS_EXIT("group");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -68,7 +68,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
since that could result in the Abort hanging if another routine is
hung holding the critical section. Also note the "not thread-safe"
comment in the description of MPI_Abort above. */
MPIU_THREAD_SINGLE_CS_ENTER("init");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ABORT);
/* Validate parameters, especially handles needing to be converted */
......@@ -125,7 +125,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ABORT);
MPIU_THREAD_SINGLE_CS_EXIT("init");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -118,7 +118,7 @@ int MPI_Finalize( void )
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("init");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FINALIZE_FUNC_ENTER(MPID_STATE_MPI_FINALIZE);
/* ... body of routine ... */
......@@ -205,7 +205,7 @@ int MPI_Finalize( void )
Since we've set MPIR_Process.initialized value to POST_FINALIZED,
if the user erroneously calls Finalize from another thread, an
error message will be issued. */
MPIU_THREAD_SINGLE_CS_EXIT("init");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
MPIU_THREAD_SINGLE_CS_FINALIZE;
/* We place the memory tracing at the very end because any of the other
......@@ -272,7 +272,7 @@ int MPI_Finalize( void )
}
# endif
mpi_errno = MPIR_Err_return_comm( 0, FCNAME, mpi_errno );
MPIU_THREAD_SINGLE_CS_EXIT("init");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
goto fn_exit;
/* --END ERROR HANDLING-- */
}
......@@ -94,7 +94,7 @@ int MPI_Bsend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_BSEND);
/* Validate handle parameters needing to be converted */
......@@ -171,7 +171,7 @@ int MPI_Bsend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_BSEND);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -67,7 +67,7 @@ int MPI_Bsend_init(void *buf, int count, MPI_Datatype datatype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_BSEND_INIT);
/* Validate handle parameters needing to be converted */
......@@ -128,7 +128,7 @@ int MPI_Bsend_init(void *buf, int count, MPI_Datatype datatype,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_BSEND_INIT);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -80,7 +80,7 @@ int MPI_Buffer_attach(void *buffer, int size)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_BUFFER_ATTACH);
# ifdef HAVE_ERROR_CHECKING
......@@ -103,7 +103,7 @@ int MPI_Buffer_attach(void *buffer, int size)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_BUFFER_ATTACH);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -97,7 +97,7 @@ int MPI_Buffer_detach(void *buffer, int *size)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_BUFFER_DETACH);
# ifdef HAVE_ERROR_CHECKING
......@@ -120,7 +120,7 @@ int MPI_Buffer_detach(void *buffer, int *size)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_BUFFER_DETACH);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -68,7 +68,7 @@ int MPI_Cancel(MPI_Request *request)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_CANCEL);
/* Convert MPI object handles to object pointers */
......@@ -181,7 +181,7 @@ int MPI_Cancel(MPI_Request *request)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_CANCEL);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -59,7 +59,7 @@ int MPI_Grequest_complete( MPI_Request request )
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GREQUEST_COMPLETE);
/* Validate handle parameters needing to be converted */
......@@ -108,7 +108,7 @@ int MPI_Grequest_complete( MPI_Request request )
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GREQUEST_COMPLETE);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -106,7 +106,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GREQUEST_START);
/* Validate parameters if error checking is enabled */
......@@ -153,7 +153,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GREQUEST_START);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -126,7 +126,7 @@ int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_IBSEND);
MPIU_THREADPRIV_GET;
......@@ -209,7 +209,7 @@ int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_IBSEND);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -62,7 +62,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_IPROBE);
/* Validate handle parameters needing to be converted */
......@@ -110,7 +110,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_IPROBE);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -66,7 +66,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("pt2pt");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_PT2PT_FUNC_ENTER_BACK(MPID_STATE_MPI_IRECV);
/* Validate handle parameters needing to be converted */
......@@ -133,7 +133,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPI_IRECV);
MPIU_THREAD_SINGLE_CS_EXIT("pt2pt");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
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