Re: Re: [Rtlinuxgpl] Interrupt Prioritization

"Calin A. Culianu" <[email protected]> Tue, 3 Jan 2006 17:24:42 -0500 (EST)
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <[email protected]>

On Tue, 3 Jan 2006, Victor Yodaiken wrote:

> Set the priorities right. The logic is, or should be,
> take an interrupt on whatever task is running
> call sem post
> if waking a thread of higher priority then switch immediately.
>
> So what you need is to make sure your higher priority thread has been
> set to a higher priority.
>
> Does that work?
>
>

Umm.. oh I get it.  So my ISR needs to have higher priority than my 
bottom-half worker thread?

Well how to I 'set' the priority of an ISR?!  I figured instinctively ISRs 
always have the highest priority.. no?

Should I just set the priority of my bottom-half worker thread to 
something negative?


Also how does one set priority?  Is the following correct:

   sched_param.sched_priority = 3;
   pthread_attr_setschedparam(&attr, &sched_param);
   error = pthread_create(&thread, &attr, isrWorkerThread, 0);


_______________________________________________
Rtl mailing list
[email protected]
http://hq.fsmlabs.com/mailman/listinfo/rtl
http:/www.rtlinux-gpl.org/