tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Devices.



On 2021-05-29 22:26, David Holland wrote:
There are a number of infelicities in the way we currently handle the
I/O plumbing for devices in the kernel. These include:

[...]

Just looking/thinking about the ioctl part - you say abolish it inside the kernel. So does that mean that we keep the ioctl() interface for user programs, but we'd create a system function that will translate ioctl() calls from user programs to different function calls based on class and function.

Which means any time anyone wants to add some new kind of function to a device, you'd have to adjust the ioctl() system call, the class, all devices of that class, and of course your specific driver which you want to do something with the hardware.

Or did I misunderstand something here?

I'm not trying to shoot anything down at this time. Just trying to understand the implications of the suggestion.

I sortof like the idea of getting some generalization, which classes would bring. But the problem with ioctl causing duplication and all kind of efforts is at the same time also a strength in that you can add something new to a device without having to care at all about all other devices and code. Since nothing else really tries to understand ioctls. Flexible, but more effort if you want coherent behavior.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index