Subject: Re: should cngetc block?
To: Kin Cho <kin@neoscale.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/06/2002 09:30:54
On 5 Feb 2002, Kin Cho wrote:

> eeh@netbsd.org writes:
>
> > If you want to change that interface so that cngetc() does not
> > block, you need to put together a proposal explaining what you
> > want to do, how you want to do it, and why it's needed.
>
> My proposal is this:
>
> Objective:
> * To provide a way to poll for keyboard input in the interface
>   "struct consdev".  However, only the "com" driver will support
>   this.

As others have noted, adding a general feature to an MI interface and then
only implimenting it for one chip won't go over well.

I think it would really help us if you explained more of what you are
doing. Why do you want to poll for characters? i.e. what else are you
doing while you're wanting input? More importantly, are interrupts
enabled?

A lot of our hesitancy stems from the fact that the cn interface, at the
level you're using, really is ment to not poll. It's ment to be used at
times when the machine is otherwise stopped. ddb is the big example.

So what is it your debugger/loader is doing that it needs to do polling
but it can't use interrupts?

Take care,

Bill