mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[Win32k]
- Add support for receiving message thread death, no real tests are available at this time. svn path=/trunk/; revision=60883
This commit is contained in:
parent
6ead16cf6e
commit
74a36d7889
1 changed files with 33 additions and 5 deletions
|
@ -1102,15 +1102,19 @@ co_MsqSendMessage(PTHREADINFO ptirec,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PVOID WaitObjects[2];
|
PVOID WaitObjects[3];
|
||||||
|
|
||||||
|
ObReferenceObject(ptirec->pEThread);
|
||||||
|
|
||||||
|
WaitObjects[0] = &CompletionEvent; // Wait 0
|
||||||
|
WaitObjects[1] = pti->pEventQueueServer; // Wait 1
|
||||||
|
WaitObjects[2] = ptirec->pEThread; // Wait 2
|
||||||
|
|
||||||
WaitObjects[0] = &CompletionEvent;
|
|
||||||
WaitObjects[1] = pti->pEventQueueServer;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
UserLeaveCo();
|
UserLeaveCo();
|
||||||
|
|
||||||
WaitStatus = KeWaitForMultipleObjects(2, WaitObjects, WaitAny, UserRequest,
|
WaitStatus = KeWaitForMultipleObjects(3, WaitObjects, WaitAny, UserRequest,
|
||||||
UserMode, FALSE, (uTimeout ? &Timeout : NULL), NULL);
|
UserMode, FALSE, (uTimeout ? &Timeout : NULL), NULL);
|
||||||
|
|
||||||
UserEnterCo();
|
UserEnterCo();
|
||||||
|
@ -1158,10 +1162,34 @@ co_MsqSendMessage(PTHREADINFO ptirec,
|
||||||
TRACE("MsqSendMessage timed out 2\n");
|
TRACE("MsqSendMessage timed out 2\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/*if (WaitStatus == STATUS_WAIT_1)
|
||||||
|
{
|
||||||
|
ERR("Event hit\n");
|
||||||
|
}*/
|
||||||
|
// Receiving thread passed on and left us hanging with issues still pending.
|
||||||
|
if (WaitStatus == STATUS_WAIT_2)
|
||||||
|
{
|
||||||
|
ERR("Thread woken up dead!\n");
|
||||||
|
Entry = pti->DispatchingMessagesHead.Flink;
|
||||||
|
while (Entry != &pti->DispatchingMessagesHead)
|
||||||
|
{
|
||||||
|
if ((PUSER_SENT_MESSAGE) CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, DispatchingListEntry)
|
||||||
|
== Message)
|
||||||
|
{
|
||||||
|
Message->CompletionEvent = NULL;
|
||||||
|
Message->Result = NULL;
|
||||||
|
RemoveEntryList(&Message->DispatchingListEntry);
|
||||||
|
Message->DispatchingListEntry.Flink = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Entry = Entry->Flink;
|
||||||
|
}
|
||||||
|
}
|
||||||
while (co_MsqDispatchOneSentMessage(pti))
|
while (co_MsqDispatchOneSentMessage(pti))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
while (NT_SUCCESS(WaitStatus) && STATUS_WAIT_0 != WaitStatus);
|
while (NT_SUCCESS(WaitStatus) && WaitStatus == STATUS_WAIT_1);
|
||||||
|
ObDereferenceObject(ptirec->pEThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(WaitStatus != STATUS_TIMEOUT)
|
if(WaitStatus != STATUS_TIMEOUT)
|
||||||
|
|
Loading…
Reference in a new issue