## Physical Device Driver Reference

[prev][next][parent][TOC]

### I/O Requests

Separate, nonmonitor threads within a monitor application can make I/O requests of other devices that will not delay movement of data through the monitor. However, a monitor thread intercepting, filtering, and returning data to the data stream should not make I/O requests of the device whose data stream it is monitoring. Such a request will result in a deadlock; data movement through the data stream will be permanently suspended. For example, a thread belonging to a keystroke monitor application calls DosMonRead, filters the data, and calls DosMonWrite. Before calling DosMonWrite, however, the thread makes a KbdCharIn keyboard subsystem call to take data from the keyboard API buffer. Because no data has reached the physical keyboard device driver's monitor chain buffer and, therefore, the keyboard API buffer, the monitor thread is blocked. The monitor thread cannot return the filtered data to the data stream and, therefore, it cannot return the filtered data to the physical device driver's monitor chain buffer.