Inter-module communication

Inter-module communication

am 12.11.2004 17:05:56 von Peter STIEGLITZ

Hi folks,
I have a requirement using 2.6 to notify more than one kernel module following the receipt of an interrupt.

I've heard of module unloading becoming a problem with other modules assuming they are still there.

What do people think is the best approach?

Regards
Pete

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Inter-module communication

am 13.11.2004 04:05:46 von Jim Nelson

Peter STIEGLITZ wrote:
> Hi folks,
> I have a requirement using 2.6 to notify more than one kernel module following the receipt of an interrupt.
>
> I've heard of module unloading becoming a problem with other modules assuming they are still there.
>
> What do people think is the best approach?
>
> Regards
> Pete
>

If this is going to be a suite of drivers, I'd probably write a function into each
module that is called whenever an interrupt of interest is called. Then, in the
bottom half of the actual interrupt handler, I'd iterate over an array of those
functions, letting each module know that an interrupt had occurred.

You'll probably need an IPC-like module to handle the message-passing interface
(unless a feature like this is already built into the kernel - anyone know?).

Interesting problem - a microkernel would make this a little easier, but I don't
think that there is a generic message-passing capability built into the Linux kernel.

There are some nasty obstacles to overcome - especially if you want to use it w/
SMP or with the real-time preemptive system in development. Unfortunately, that's
where my kernel-hacking skills run dry. Ask me again in a year or so - I could
probably give you a better answer then :)

Jim
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs