Subject: Re: IOCTL implementation and kernel/userland addresses
To: Bill Studenmund <wrstuden@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 02/14/2005 21:00:24
On Mon, Feb 14, 2005 at 11:56:40AM -0800, Bill Studenmund wrote:
> On Mon, Feb 14, 2005 at 07:50:31PM +0100, Manuel Bouyer wrote:
> > On Mon, Feb 14, 2005 at 10:45:57AM -0800, Bill Studenmund wrote:
> > > Ahh, I was mistakenly thinking that ltsleep wants the proc pointer, and 
> > > thus NULL would have problems. As it doesn't, we should be fine.
> > 
> > Still we could use the proc pointer to know if it's safe to sleep
> > or not ...
> 
> ioctls should either sleep or not sleep. I do not think the behavior of a 
> given ioctl should change depending on the calling context. If we need a 
> sleeping and a non-sleeping variant, we should have two calls. :-)

I agree it's probably a corner case, but it'd be nice to have provisions for
this in the interface anyway ...

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--