[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Exporting symbols between modules (was Re: Using device files in "/dev" from kernel space)
2010/12/24 m0n0 <ole@monochrom.net>:
>
> Am Donnerstag, den 23.12.2010, 23:39 +0100 schrieb David Gálvez
> <dgalvez75@gmail.com>:
>
>> No, I don't think so. From what I could see until now under MiNT you
>> can't export functions between kernel modules (KM). This is one of the
>> reasons why I'm asking about using a pseudo-device from kernel space,
>> to workaround these limitations.
>
> I think there must be an clean way to do it. Look at the networking stack...
> there we have: hardware drivers (.xif), protocol drivers (inet4.xdd) &
> socket API
>
> I guess the modules must register themselves within the other layers
> somehow. Do you know how they do it?
>
I was talking about KM modules, this means exporting functions between
loadable modules.
>From what I could see until now to export functions between two
modules you must create a new kind of module dependent the first
module and creating a new interface with a specific API for this kind
of module. For example xaaes.km -> mouse.adi. adi modules are
specific modules and dependent of xaaes.km.
The disadvantage I see with this method is that adi isn't loadable,
It's loaded when you load the km module, and can't be unloaded.
Another issue could be that you can end up with many kind of different
modules I don't know if this is a good thing. Now there is xfs, xdd,
xif, km, adi, etc.. and I would need two more for USB.