[linux-audio-dev] jack_callback <-> rest of the world

Jack O'Quin joq at io.com
Mon Oct 31 02:10:13 UTC 2005


fons adriaensen <fons.adriaensen at skynet.be> writes:

> On Sun, Oct 30, 2005 at 01:53:48PM +0100, Florian Schmidt wrote:
>
>> Oh i thought i read somewhere that when pthread_cond_wait it is not
>> guaranteed that anyone actually signalled. Will do some more reading.
>
> It can return on unix signals, so you have to test for EINTR.
> I don't think it will wake up unexpectedly otherwise.

According to the POSIX spec the signalled thread is not guaranteed
that anything interesting has actually happened.  It needs to check
its own status and (perhaps) wait a while longer.

> I'm thinking of rewriting the whole ITC object so it uses a
> futex instead of the CV (that would also enable it to work
> in shared memory across process boundaries), but then I really
> need a lock free implementation for the linked lists. 
> I guess the required primitives are platform dependant.
> Is their some library that provides them ?

I believe there are no futexes in Linux 2.4 kernels.  So, portable
applications need some other solution.  That's the main advantage of
the pthread interfaces.  They are not particularly wonderful, but they
are (relatively) portable.
-- 
  joq



More information about the Linux-audio-dev mailing list