At 9:50 PM 3/5/96 -0500, Jonathan S. Shapiro wrote:
>...
>On the x86 keyboard interface, what should be done in the face of
>keyboard overrun? It does not appear to be possible to flow control
>the keyboard - one can process and discard the input, but there
>doesn't appear to be a way to tell the keyboard not to produce output.
In the kernel, I would:
(1) Allocate a big buffer. I would use 1K. Doing this, you eliminate most of the need to do the rest right.
(2) Detect and report overruns to the domain level driver (3) Accept or discard multi-scan code keys as a unit (all or nothing). (4) Consider clearing the entire buffer on overrun (perhaps on orders fromdomain level driver).
In the domain level driver, I would: On overflow, clear the kernel buffer and query the keyboard to restore my version of its state. If that kernel buffer fills, things in the hardward or software have been really bleeped up. A total reset and restart is in order. If there is a way to inform the user what has happened, I would use it.
Regards - Bill
Bill Frantz | The CDA means | Periwinkle -- Computer Consulting (408)356-8506 | lost jobs and | 16345 Englewood Ave. frantz@netcom.com | dead teenagers | Los Gatos, CA 95032, USA