What's the proper way to do console input?

Nat Lanza (magus@cs.cmu.edu)
29 Apr 1999 10:58:31 -0400


I've started porting the kernel monitor patch mentioned on this list
recently to 2.2.x, and I'm a bit confused about the "right" way to do
console input in the monitor. The patches I've seen that do similar
things (the kdb patch and the previous version of the monitor) are
fairly device-specific -- the old kernel monitor does IO directly
through serial_inb and serial_outb, and the kdb patch reads scancodes
from th keyboard. I'd ideally like to write something that works for
any arbitrary registered console, so those approaches are out.

Is console->wait_key what I want? If I want to do things with
interrupts disabled (since I'd like to prevent anything else from
running on the system while in the monitor), am I going to have to
roll my own polling IO functions for the console types I care about?

--nat

-- 
nat lanza --------------------- research programmer, parallel data lab, cmu scs
magus@cs.cmu.edu -------------------------------- http://www.cs.cmu.edu/~magus/
there are no whole truths; all truths are half-truths -- alfred north whitehead

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/