Tue, 08 Feb 2000 roux jean-denis wrote:
> I would like to know if it's possible for a RTL
> module to execute functions that are in another
> module. And of course for this module to execute
> functions in the RTL module??
RTL module == (kernel module that uses RTL stuff)
That is, yes, you can call functions across module boundaries, as they're all
in the same address space; the kernel space.
> This question is due to a problem I have. I must
> change a driver to be real time, and this driver
> exchange data and events with the isdn4linux module
> (which might exchange data and events with ipppd under
> linux os).
> So is it safe to do a "normal" function call? Or did
> I have to use fifos or something else?
Well, you have to keep in mind that you can't use any unsafe kernel calls
(most of them, that is...) inside the functions you call. That is, all code
must be RTL safe, as it will run in RT context (ie may be preempting the
kernel), or you'll break the kernel's sync code.
So, unless the functions you need to call are free from normal kernel spinlocks
and the like, you can't safely call them directly. And as they cannot run in
true hard real time anyway, as they can be delayed by other standard Linux
kernel activity, there's not really much point.
Solution 1:
-----------
Use FIFOs or similar buffering, and execute those function calls from normal
kernel context. Bottom halves triggered from RT space is the usual way to go.
+ Easy
- The non-RTL code is still soft RT...
Solution 2:
-----------
Hack the unsafe code to make it RTL safe, and then use it directly.
+ Hard real time all the way through
- More complex. You might actually end up being forced
to port large part of the kernel to RTL!
Solution 1 is the natural choice, unless you *really* need to run everything in
hard real time.
Regards,
//David
P r o f e s s i o n a l L i n u x A u d i o
· ··-------------------------------------------------·· ·
MuCoS - http://www.linuxdj.com/mucos
Audiality - http://www.angelfire.com/or/audiality
David Olofson - [EMAIL PROTECTED]
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/