Re: Re: [Rtlinuxgpl] Interrupt Prioritization
Victor Yodaiken <[email protected]> Tue, 03 Jan 2006 15:21:03 -0700
| Newsgroups | gmane.linux.real-time.rtlinux.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2006-01-03 at 17:10 -0500, Calin A. Culianu wrote: > > > > > The design I recommend in RTLinux is to make the ISR very short and have it > > pass the time consuming part to a thread. For example, the ISR can post > > to a semphore and a thread can fill the sound driver buffer. > > Does that work for your application? > > > > Hi Victor, > > I tried the above design that you recommend. It turns out that in rtlinux > free 3.2 sem_post() calls rtl_schedule, and as a result, my ISR 'worker' > thread (bottom half) ends up running right inside my ISR top half! 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? > The result is equivalent to if I would have just not even bothered and > done everything in a big fat ISR. > > What gives? > > How can I post to a semaphore and/or wakeup an rtlinux pthread *without* > yielding the current thread of execution?!? > > -Calin _______________________________________________ Rtl mailing list [email protected] http://hq.fsmlabs.com/mailman/listinfo/rtl http:/www.rtlinux-gpl.org/