On Thu, Apr 27, 2000 at 10:27:18AM +0200, Ivan Martinez wrote:
>       Hello all,
>       I have a control system where some tasks are scheduled by RTLinux. Now
> I need to add some others tasks whose execution is launched by hardware
> interrupts. My first question is if these tasks should be scheduled by
> RTLinux in some way, or they are a job of the Linux scheduler. Thank
> you.


It depends on whether you want RT interrupt handling or not.
The simplest RT interrupt handlers are not threads, they are, essentially, signal
handlers that run in the context of whatever thread is running when the interupt
is processed.
            rtl_request_irq(n,my_handler);

Otherwise, it is easy to do:

           my_handler:
                 /* got an interrupt. Wake up handler */
                 pthread_kill(my_handler_thread,RTL_SIGNAL_WAKEUP);
                 return;

Or 
           my _handler:
              /* got an interrupt: wake thread and see if we can reschedule */
              pthread_wakeup_np(my_handler_thread);

Or         my_handler /* this will work in RTLinux 2.4/ 3.4 or sooner if you need it*/
             /* got an interrupt: send it to linux */
             pthread_wakeup_np(pthread_linux(),n);





>       Regards,
> -- 
> Ivan Martinez (Rodriguez)
> BEng in Software Engineering - MSc student
> http://www.student.dtu.dk/~u990873
> "Got fabes?"
> -- [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/

-- 
---------------------------------------------------------
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

-- [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