Also serialize access to KeyboardQueueEmpty.


svn path=/branches/ntvdm/; revision=61215
This commit is contained in:
Aleksandar Andrejevic 2013-12-04 00:43:11 +00:00
parent 73186a64bd
commit 6dde554aa8

View file

@ -93,9 +93,13 @@ BYTE KeyboardReadStatus()
{
BYTE Status = 0;
WaitForSingleObject(QueueMutex, INFINITE);
/* Set the first bit if the data can be read */
if (KeyboardReadResponse || !KeyboardQueueEmpty) Status |= 1 << 0;
ReleaseMutex(QueueMutex);
/* Always set bit 2 */
Status |= 1 << 2;