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
......@@ -373,14 +373,14 @@ M*/
/* Helper definitions */
#if MPIU_THREAD_GRANULARITY == MPIU_THREAD_GRANULARITY_GLOBAL
#define MPIU_THREAD_CHECKNEST(_name)
/*#define MPIU_THREAD_CHECKNEST(_name)*/
/* XXX DJG temporarily disabled for the paper... this breaks our CS_EXIT(ALLFUNC) in sock_wait.i */
#if 0
/* #if 0 */
#define MPIU_THREAD_CHECKNEST(_name) \
MPIU_THREADPRIV_DECL; \
MPIU_THREADPRIV_GET; \
if (MPIR_Nest_value() == 0)
#endif
/* #endif */
#define MPIU_THREAD_CHECKDEPTH(_name,_value)
#define MPIU_THREAD_UPDATEDEPTH(_name,_value)
......
......@@ -59,7 +59,7 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_DELETE);
/* Validate parameters, especially handles needing to be converted */
......@@ -103,7 +103,7 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_DELETE);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -79,7 +79,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attr_value, int *flag)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_GET);
/* Validate parameters, especially handles needing to be converted */
......@@ -135,7 +135,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attr_value, int *flag)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_GET);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -78,7 +78,7 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attr_value)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_PUT);
/* Validate parameters, especially handles needing to be converted */
......@@ -122,7 +122,7 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attr_value)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_PUT);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -76,7 +76,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
......@@ -118,7 +118,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CREATE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -59,7 +59,7 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -138,7 +138,7 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_DELETE_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -59,7 +59,7 @@ int MPI_Comm_free_keyval(int *comm_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
......@@ -107,7 +107,7 @@ int MPI_Comm_free_keyval(int *comm_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_FREE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -70,7 +70,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_GET_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -288,7 +288,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_GET_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -73,7 +73,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -167,7 +167,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SET_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -74,7 +74,7 @@ int MPI_Keyval_create(MPI_Copy_function *copy_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_KEYVAL_CREATE);
/* Validate parameters and objects (post conversion) */
......@@ -102,7 +102,7 @@ int MPI_Keyval_create(MPI_Copy_function *copy_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_KEYVAL_CREATE);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -61,7 +61,7 @@ int MPI_Keyval_free(int *keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_KEYVAL_FREE);
# ifdef HAVE_ERROR_CHECKING
{
......@@ -86,7 +86,7 @@ int MPI_Keyval_free(int *keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_KEYVAL_FREE);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -68,7 +68,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
......@@ -110,7 +110,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -59,7 +59,7 @@ int MPI_Type_delete_attr(MPI_Datatype type, int type_keyval)
/* The thread lock prevents a valid attr delete on the same datatype
but in a different thread from causing problems */
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -144,7 +144,7 @@ int MPI_Type_delete_attr(MPI_Datatype type, int type_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_DELETE_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -56,7 +56,7 @@ int MPI_Type_free_keyval(int *type_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
......@@ -104,7 +104,7 @@ int MPI_Type_free_keyval(int *type_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_FREE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -72,7 +72,7 @@ int MPI_Type_get_attr(MPI_Datatype type, int type_keyval, void *attribute_val,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_GET_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -134,7 +134,7 @@ int MPI_Type_get_attr(MPI_Datatype type, int type_keyval, void *attribute_val,
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_GET_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -65,7 +65,7 @@ int MPI_Type_set_attr(MPI_Datatype type, int type_keyval, void *attribute_val)
/* The thread lock prevents a valid attr delete on the same datatype
but in a different thread from causing problems */
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -164,7 +164,7 @@ int MPI_Type_set_attr(MPI_Datatype type, int type_keyval, void *attribute_val)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_SET_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -68,7 +68,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
......@@ -110,7 +110,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_CREATE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -60,7 +60,7 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval)
/* The thread lock prevents a valid attr delete on the same window
but in a different thread from causing problems */
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -143,7 +143,7 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_DELETE_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
fn_fail:
......
......@@ -57,7 +57,7 @@ int MPI_Win_free_keyval(int *win_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
......@@ -104,7 +104,7 @@ int MPI_Win_free_keyval(int *win_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FREE_KEYVAL);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
......@@ -68,7 +68,7 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val,
MPIR_ERRTEST_INITIALIZED_ORDIE();
MPIU_THREAD_SINGLE_CS_ENTER("attr");
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_GET_ATTR);
/* Validate parameters, especially handles needing to be converted */
......@@ -187,7 +187,7 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val,
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_GET_ATTR);
MPIU_THREAD_SINGLE_CS_EXIT("attr");
MPIU_THREAD_CS_EXIT(ALLFUNC,);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
......
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