Re: [linux-audio-dev] priority inversion & inheritance

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] priority inversion & inheritance
From: yodaiken_AT_fsmlabs.com
Date: Fri Jul 12 2002 - 15:06:18 EEST


On Fri, Jul 12, 2002 at 10:31:14AM +0200, Peter Hanappe wrote:
> yodaiken_AT_fsmlabs.com wrote:
> > On Fri, Jul 12, 2002 at 01:40:42AM +0200, Peter Hanappe wrote:
> >
> >>yodaiken_AT_fsmlabs.com wrote:
> >>
> >>
> >>>For example, in RTLinux, fifos shared
> >>>between Linux (non-rt) processes and RT threads are asymmetric: the
> >>>RT thread never blocks, the non-RT thread blocks. In many cases
> >>>it is best to optimize the data operations and perform them under
> >>>a spin_lock with interrupts disabled. In RTLinux pthread_spin_lock
> >>>disables irqs and, in SMP also sets the lock
> >>> pthread_spin_lock(&myq.spin);
> >>> myq.tail->next = new;
> >>> new->next = 0;
> >>> myq.tail= next;
> >>> if(!myq.head)myq.head = new;
> >>> pthread_spin_unlock(&myq.spin);
> >>>
> >>How do you tell a blocking non-RT thread that new data is available?
> >>
> >
> > It's done automatically by a write: a write does sends a soft interrupt to
> > Linux and the interrupt handler does a standard wakeup on flagged fifos.
>
> This wakeup doesn't involve a call to the scheduler?
>

It does - but to the Linux scheduler.

>
>
>
>

-- 
---------------------------------------------------------
Victor Yodaiken 
Finite State Machine Labs: The RTLinux Company.
 www.fsmlabs.com  www.rtlinux.com


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jul 12 2002 - 15:14:57 EEST