On Thu, May 04, 2000 at 08:38:32PM +0530, santhosh m kumar wrote:
> Hi
> 
>       What will happen if i have a code like this,
> 
> Thread 1
>       ---
>       rtl_no_interrupts
>       rtl_schedule
>       rtl_restore_interrupts 
>       ---
> 
> Thread 2
>       ---
>       rtl_schedule
>       ---
> 
>       Will the correct interrupt status be restored.
> 

Yes. 
                      thread 2 running with interrupts enabled
                               call rtl_schedule
                               switch to thread 1
                      thread 1 disables interrupts
                               calls rtl_schedule
                               switch to thread 2
                      thread 2 is running with interrupts enabled!

        

> Thanks and Regards
> Santhosh
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 04, 2000 8:26 PM
> To:   santhosh m kumar
> Cc:   '[EMAIL PROTECTED]'
> Subject:      Re: [rtl] rtl_no_interrupts question
> 
> On Thu, May 04, 2000 at 12:59:33PM +0530, santhosh m kumar wrote:
> > Hi,
> > 
> >     In pthread_make_periodic_np and few other function in rtl_sched.c, 
> > rtl_no_interrupts is called and then rtl_schedule is called. After which 
> > rtl_restore_interrupts is done.
> >     Will this not cause some problems, that is the interrupts will be disable 
> > when the new task is running. If i am wrong, can any one tell me where 
> > exactly is the rtl_restore_interrupts done.
> 
> The scheduler does
>                 save the interrupt status
>                 disable interrupts
>                 switch to new thread
>                 restore interrupt status saves for this thread.
> 
> So the new thread will run with the correct interrupt status.
> 
> 
> > 
> >     One more question, is priority inversion supported in RTL.
> 
> Priority inversion is a design issue. RTLinux is designed so that the
> RT threads never wait for Linux unless they request to do so. You should
> design your RT application so that lower priority threads do not
> hold resources needed by higher priority threads, except when they have
> disabled scheduling. It's not very hard unless the application is too
> complex -- and then nothing will help anyways except for a redesign.
> 
> 
> > 
> > Thanks and Regards
> > Santhosh
> > -- [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.
> 

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