Subject: Re: Console polling programming interface change (proposal)
To: None <>
From: Jaromír <>
List: tech-kern
Date: 07/20/2001 16:22:14
Bill Studenmund wrote:
> I gather right now it's 'void (*cnpollc)(dev_t dev, int on)' ? Another
> option is:
> void (*cnpollc)(dev_t dev, int on, int *cookie)
> Then the caller doesn't have to do anything special about passing the
> cookie in or out.

It probably doesn't matter, since the only direct callers would be
cnpollc() and cnunpollc(). I considered your way before post too.
I don't quite have strong preference either way, it seems I'd need
to flip a coin :)

Chris Demetriou wrote:
> and what is the meaning of said 'cookie'?  are you sure it can always
> fit in an 'int'?  (i.e., would it ever need to be a pointer, or a
> wider register value, or...???)

Oh, right :) The thing I want to use it for (value returned from spl call)
is just int, but it's possible something would rather pass a pointer.

OK, I'd change the entry point type to

	void (*cnpollc)(dev_t dev, int on, void**cookie);

Jaromir Dolecek <>
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!