mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:53:06 +00:00
[CSRSRV][CONSRV]
- Fix the second parameter WaitType (aka. NotifyAll) of CsrNotifyWait. Indeed, we used before the constants WaitAll == 0 / WaitAny == 1 (see the WAIT_TYPE enum); however, it appeared that Win2k3's CsrNotifyWait wanted a WaitType parameter == 1 when waiting for all the waits in a given wait-list. Therefore we would have to use WaitAll for waiting for any of the wait blocks, and WaitAny for waiting for all the wait blocks... looks illogical. Therefore I use instead a BOOLEAN variable (that I call NotifyAll) which is TRUE when I want to wait for all the wait blocks, and FALSE otherwise (as done e.g. for the WaitForMultipleObjects API). - Fix its usage in CONSRV. Magically fix key presses problems in console, when using Win2k3 csrsrv.dll ... svn path=/trunk/; revision=60551
This commit is contained in:
parent
44276fa90e
commit
2739584249
6 changed files with 13 additions and 10 deletions
|
@ -349,7 +349,7 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY DestinationList,
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
||||||
IN ULONG WaitType,
|
IN BOOLEAN NotifyAll,
|
||||||
IN PVOID WaitArgument1,
|
IN PVOID WaitArgument1,
|
||||||
IN PVOID WaitArgument2);
|
IN PVOID WaitArgument2);
|
||||||
|
|
||||||
|
|
|
@ -372,8 +372,8 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY DestinationList,
|
||||||
* @param WaitList
|
* @param WaitList
|
||||||
* Pointer to the wait list whose wait blocks will be notified.
|
* Pointer to the wait list whose wait blocks will be notified.
|
||||||
*
|
*
|
||||||
* @param WaitType
|
* @param NotifyAll
|
||||||
* Type of the wait to perform, either WaitAny or WaitAll.
|
* Whether or not we must notify all the waits.
|
||||||
*
|
*
|
||||||
* @param WaitArgument[1-2]
|
* @param WaitArgument[1-2]
|
||||||
* User-defined argument to pass on to the wait function.
|
* User-defined argument to pass on to the wait function.
|
||||||
|
@ -386,7 +386,7 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY DestinationList,
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
||||||
IN ULONG WaitType,
|
IN BOOLEAN NotifyAll,
|
||||||
IN PVOID WaitArgument1,
|
IN PVOID WaitArgument1,
|
||||||
IN PVOID WaitArgument2)
|
IN PVOID WaitArgument2)
|
||||||
{
|
{
|
||||||
|
@ -420,8 +420,11 @@ CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
||||||
0,
|
0,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
/* We've already done a wait, so leave unless this is a Wait All */
|
/*
|
||||||
if (WaitType != WaitAll) break;
|
* We've already done a wait, so leave unless
|
||||||
|
* we want to notify all the waits...
|
||||||
|
*/
|
||||||
|
if (!NotifyAll) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ ConioProcessInputEvent(PCONSOLE Console,
|
||||||
|
|
||||||
SetEvent(Console->InputBuffer.ActiveEvent);
|
SetEvent(Console->InputBuffer.ActiveEvent);
|
||||||
CsrNotifyWait(&Console->InputBuffer.ReadWaitQueue,
|
CsrNotifyWait(&Console->InputBuffer.ReadWaitQueue,
|
||||||
WaitAny,
|
FALSE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
if (!IsListEmpty(&Console->InputBuffer.ReadWaitQueue))
|
if (!IsListEmpty(&Console->InputBuffer.ReadWaitQueue))
|
||||||
|
|
|
@ -282,7 +282,7 @@ ConioUnpause(PCONSOLE Console, UINT Flags)
|
||||||
Console->UnpauseEvent = NULL;
|
Console->UnpauseEvent = NULL;
|
||||||
|
|
||||||
CsrNotifyWait(&Console->WriteWaitQueue,
|
CsrNotifyWait(&Console->WriteWaitQueue,
|
||||||
WaitAll,
|
TRUE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
if (!IsListEmpty(&Console->WriteWaitQueue))
|
if (!IsListEmpty(&Console->WriteWaitQueue))
|
||||||
|
|
|
@ -123,7 +123,7 @@ ConioUnpause(PCONSOLE Console, UINT Flags)
|
||||||
Console->UnpauseEvent = NULL;
|
Console->UnpauseEvent = NULL;
|
||||||
|
|
||||||
CsrNotifyWait(&Console->WriteWaitQueue,
|
CsrNotifyWait(&Console->WriteWaitQueue,
|
||||||
WaitAll,
|
TRUE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
if (!IsListEmpty(&Console->WriteWaitQueue))
|
if (!IsListEmpty(&Console->WriteWaitQueue))
|
||||||
|
|
|
@ -89,7 +89,7 @@ ConSrvCloseHandleEntry(PCONSOLE_IO_HANDLE Entry)
|
||||||
* return.
|
* return.
|
||||||
*/
|
*/
|
||||||
CsrNotifyWait(&InputBuffer->ReadWaitQueue,
|
CsrNotifyWait(&InputBuffer->ReadWaitQueue,
|
||||||
WaitAll,
|
TRUE,
|
||||||
NULL,
|
NULL,
|
||||||
(PVOID)Entry);
|
(PVOID)Entry);
|
||||||
if (!IsListEmpty(&InputBuffer->ReadWaitQueue))
|
if (!IsListEmpty(&InputBuffer->ReadWaitQueue))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue