[NTVDM]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Wed, 4 Dec 2013 00:43:11 +0000 (00:43 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Wed, 4 Dec 2013 00:43:11 +0000 (00:43 +0000)
Also serialize access to KeyboardQueueEmpty.

svn path=/branches/ntvdm/; revision=61215

subsystems/ntvdm/ps2.c

index cdaacd2..5138d0b 100644 (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;