Commit bb7405c7 authored by jayesh's avatar jayesh
Browse files

MT: Re-acquire thread lock when GetQueuedCompletionStatus() returns an error...

MT: Re-acquire thread lock when GetQueuedCompletionStatus() returns an error -- patch from Intel -- See Req 3667
parent 49286ec1
......@@ -2419,6 +2419,20 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
}
else
{
#if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE)
# if (USE_THREAD_IMPL == MPICH_THREAD_IMPL_GLOBAL_MUTEX)
{
/* Reaquire the lock before processing any of the information returned from GetQueuedCompletionStatus */
MPIU_DBG_MSG(THREAD,TYPICAL,"Enter global critical section");
MPIU_THREAD_CHECK_BEGIN
MPID_Thread_mutex_lock(&MPIR_ThreadInfo.global_mutex);
MPIU_THREAD_CHECK_END
}
# else
# error selected multi-threaded implementation is not supported
# endif
#endif
/*MPIDI_FUNC_EXIT(MPID_STATE_GETQUEUEDCOMPLETIONSTATUS);*/ /* Maybe the logging will reset the last error? */
mpi_errno = GetLastError();
/*t2 = PMPI_Wtime();*/
......
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