Re: My nikel to Linux kernel wishlist ( module_syscall )

David Olofson (audiality@swipnet.se)
Tue, 24 Aug 1999 02:55:43 +0200


sergey@memco.com wrote:
(...)
> > So, I have butchered it slightly, but now your device control interface
> > looks like:
> >
> >int opendevice(const char * pathname, int flags);
> >int devctl(int dd, int request, ...);
> >int closedevice(int dd);
>
> >Well, that looks like a rather useful interface. I think I might patent
> >it :-)
>
> Ok. Looks like a open/ioctl/close . So that another good idea ! Stop supporting
> a
> /proc/modules file and start support a /proc/modules directory. Every
> file in that directory would link to dynamic kernel module and would
> have the same name. You can use every IO system call ( even select& poll)
> for that 'file'.
(...)
> In that case we need to export a new struct file_operation per
> each module.

Uh oh... So, we have a new way of providing /dev/ functionality with a
slightly different device mapping scheme.

Ok, I kind of like the idea of a more "module instance = device
instance" kind of mapping for some things (kernel sofware engines that
only occur in one instance, for example), but I'm still having a problem
seeing what the point is with all this. I think it looks more like a
matter of "how to find the device I want to access"...

Oh, you may want to look at the RTLinux POSIX I/O module, originally
written by Victor Yodaiken (I think - there was no comment in the
original files...), modified a little for my Driver Programming
Interface. (For porting drivers to RTLinux easily - no new API.) It now
uses the standard Linux file, file_operations, and inode structs, but
the inode struct thing is a quick hack that I need to clean up some
more. (What about some locking, for example? None at all in the current
version.)

The next DPI version, hopefully with a cleaner rtl_posixio, will be
released soon, but I have a song to record and mix before the weekend...

Site at: http://www.angelfire.com/or/audiality/download.html

Anyway, it implements about everything you need, except for the /proc/
part, which you could grab elsewhere. However, I'd try to find out what
the point is, really... Too hard to find a device using major + minor
and a /dev/ file? ;-)

//David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/