Hi! pascal.

First of all, I am sorry for missing your first letter and i had no experience of RTAI.
I am going to explain what i am thinking as a solution in case of RTL.
I hope you can use RTL instead of RTAI.
But the following method is not verified.

1. Install your linux interrupt handler as a soft interrupt handler using 
'rtl_get_soft_irq()'
2. In real-time interrupt handler, use 'rtl_global_pend_irq()' to call your linux 
interrupt handler.


----- Original Message ----- 
From: "Pascal Charest" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2000 1:54 AM
Subject: Re: [rtl] Interrupts


> Hi,
>  
> So, if I can't call Linux interrupt handler within an RTAI handler, can
> I use two independant handlers ; one from RTAI and the other from Linux?
>  
> I've a driver that uses Linux interrupt handler.  Then, I want a
> realtime process that is calling by the same interrupt.  When I'm using
> rt_request_global_irq() and doing nothing in my handler, the system
> restart or all is ok ; it depends of the Linux driver I use.
>  
> How can I activate, if I can, Linux handler using the same irq?  I've
> used rt_pend_linux_irq() in my handler but it may crash too.
>  
> Pascal
> Charest                                                                  
> 
> Karim Yaghmour wrote:
> > 
> > Hello Pascal,
> > 
> > I beleive the problem comes from the fact that you are calling the
> > Linux interrupt handler from within an RTAI handler. Since Linux
> > interrupt handlers might call on lock mechanisms redirected by
> > RTAI, this is where things get messy.
> > 
> > Rather than using rt_request_global_irq(), try using rt_request_linux_irq().
> > What this will do is add your handler to the list of handlers linux
> > will call when the IRQ happens. Therefore, the normal handler gets
> > called and so does yours. Your handler can then use RTAI locking
> > mechanisms to do it's work.
> > 
> > This is actually currently used from within the RTAI schedulers to
> > try recovering lost jiffies (this is from start_rt_timer in the upscheduler):
> > rt_request_linux_irq(TIMER_8254_IRQ, recover_jiffies, "rtai_sched", 
>recover_jiffies);
> > 
> > The recover_jiffies function now gets called every time a timer
> > interrupt gets to Linux.
> > 
> > J'espere que ca pourra vous aider ...
> > 
> > Karim
> > 
> > Pascal Charest wrote:
> > >
> > > Hi,
> > >
> > > I'm trying to catch interruptions with rtai and forcing the linux
> > > interrupt handler, but I don't know how to do it correctly.  In fact, I
> > > want to use different drivers with my rt_process and to make them
> > > realtime without changing their code.  There is a example of what I want
> > > to do :
> > >
> > > void handler(int irq)
> > > {
> > >         ... forcing linux interrupt handler
> > >         ... doing my own work
> > > }
> > >
> > > int init_module()
> > > {
> > >         ...
> > >     rt_request_global_irq(IRQ, (void*)handler);
> > >     rt_startup_irq(IRQ);
> > >         ...
> > > }
> > >
> > > When I try something, linux stops or the computer restarts when the
> > > interrupt occurs ; it depends of the rt fonctions I use in my handler.
> > > Do someone know how to do it?
> > >
> > > Thanks in  advance,
> > >
> > > Pascal Charest
> > > -- [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/
> > 
> > --
> > ===================================================
> >                  Karim Yaghmour
> >                [EMAIL PROTECTED]
> >           Operating System Consultant
> >  (Linux kernel, real-time and distributed systems)
> > ===================================================
> > -- [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/
> -- [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/
> 
-- [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/

Reply via email to