Re: upcalls from kernel code to user space daemons

From: Tim Hockin
Date: Mon Jun 14 2004 - 17:59:59 EST


On Mon, Jun 14, 2004 at 06:22:48PM -0400, Chris Friesen wrote:
> > > Not quite. The userspace is passing data down as well. I don't know
> >how you'd
> > > do that with read().
> >
> >For this you use write().

> Although I have to admit it's not pretty, and the performance improvements
> may not be worth the obfuscation of the code.

You know, I've never understood why people hate ioctl. Sometimes, it
really is what you want. Why impose structured data onto a 2-way
unstructred system (read/write) when you have a structured system at hand
(ioctl).

I like ioctl() when it makes sense. read() and write() are for data.
ioctl is for (tada!) control.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/