Release the Win16 lock before waiting in MsgWaitForMultipleObjectsEx.

This commit is contained in:
Alexandre Julliard 2002-07-01 18:20:16 +00:00
parent 142dab8c81
commit 3c43df8aa0
1 changed files with 3 additions and 2 deletions

View File

@ -689,7 +689,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
DWORD timeout, DWORD mask, DWORD flags )
{
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
DWORD i, ret;
DWORD i, ret, lock;
MESSAGEQUEUE *msgQueue;
if (count > MAXIMUM_WAIT_OBJECTS-1)
@ -714,7 +714,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
for (i = 0; i < count; i++) handles[i] = pHandles[i];
handles[count] = msgQueue->server_queue;
ReleaseThunkLock( &lock );
if (USER_Driver.pMsgWaitForMultipleObjectsEx)
{
ret = USER_Driver.pMsgWaitForMultipleObjectsEx( count+1, handles, timeout, mask, flags );
@ -723,6 +723,7 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
else
ret = WaitForMultipleObjectsEx( count+1, handles, flags & MWMO_WAITALL,
timeout, flags & MWMO_ALERTABLE );
if (lock) RestoreThunkLock( lock );
return ret;
}