mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +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
|
||||
NTAPI
|
||||
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
||||
IN ULONG WaitType,
|
||||
IN BOOLEAN NotifyAll,
|
||||
IN PVOID WaitArgument1,
|
||||
IN PVOID WaitArgument2);
|
||||
|
||||
|
|
|
@ -372,8 +372,8 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY DestinationList,
|
|||
* @param WaitList
|
||||
* Pointer to the wait list whose wait blocks will be notified.
|
||||
*
|
||||
* @param WaitType
|
||||
* Type of the wait to perform, either WaitAny or WaitAll.
|
||||
* @param NotifyAll
|
||||
* Whether or not we must notify all the waits.
|
||||
*
|
||||
* @param WaitArgument[1-2]
|
||||
* User-defined argument to pass on to the wait function.
|
||||
|
@ -386,7 +386,7 @@ CsrMoveSatisfiedWait(IN PLIST_ENTRY DestinationList,
|
|||
BOOLEAN
|
||||
NTAPI
|
||||
CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
||||
IN ULONG WaitType,
|
||||
IN BOOLEAN NotifyAll,
|
||||
IN PVOID WaitArgument1,
|
||||
IN PVOID WaitArgument2)
|
||||
{
|
||||
|
@ -420,8 +420,11 @@ CsrNotifyWait(IN PLIST_ENTRY WaitList,
|
|||
0,
|
||||
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);
|
||||
CsrNotifyWait(&Console->InputBuffer.ReadWaitQueue,
|
||||
WaitAny,
|
||||
FALSE,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!IsListEmpty(&Console->InputBuffer.ReadWaitQueue))
|
||||
|
|
|
@ -282,7 +282,7 @@ ConioUnpause(PCONSOLE Console, UINT Flags)
|
|||
Console->UnpauseEvent = NULL;
|
||||
|
||||
CsrNotifyWait(&Console->WriteWaitQueue,
|
||||
WaitAll,
|
||||
TRUE,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!IsListEmpty(&Console->WriteWaitQueue))
|
||||
|
|
|
@ -123,7 +123,7 @@ ConioUnpause(PCONSOLE Console, UINT Flags)
|
|||
Console->UnpauseEvent = NULL;
|
||||
|
||||
CsrNotifyWait(&Console->WriteWaitQueue,
|
||||
WaitAll,
|
||||
TRUE,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!IsListEmpty(&Console->WriteWaitQueue))
|
||||
|
|
|
@ -89,7 +89,7 @@ ConSrvCloseHandleEntry(PCONSOLE_IO_HANDLE Entry)
|
|||
* return.
|
||||
*/
|
||||
CsrNotifyWait(&InputBuffer->ReadWaitQueue,
|
||||
WaitAll,
|
||||
TRUE,
|
||||
NULL,
|
||||
(PVOID)Entry);
|
||||
if (!IsListEmpty(&InputBuffer->ReadWaitQueue))
|
||||
|
|
Loading…
Reference in a new issue