[NTVDM]
[reactos.git] / 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;