Commit 8c38f45a authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed some deadlock(s) in message sending.

parent b068320a
......@@ -701,8 +701,19 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
if ( !THREAD_IsWin16( THREAD_Current() ) )
{
/* win32 thread, use WaitForMultipleObjects */
MsgWaitForMultipleObjects( 0, NULL, FALSE, timeout, queue->wakeMask );
BOOL bHasWin16Lock;
DWORD dwlc;
if ( (bHasWin16Lock = _ConfirmWin16Lock()) )
{
TRACE_(msg)("bHasWin16Lock=TRUE\n");
ReleaseThunkLock( &dwlc );
}
WaitForSingleObject( queue->hEvent, timeout );
if ( bHasWin16Lock )
{
RestoreThunkLock( dwlc );
}
}
else
{
......@@ -720,7 +731,7 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
Yield16();
}
}
}
}
}
......
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