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

From: Jack O'Quin <joq@email-addr-hidden>
Date: Mon Oct 31 2005 - 04:10:13 EET

fons adriaensen <fons.adriaensen@email-addr-hidden> 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
Received on Mon Oct 31 08:15:04 2005

This archive was generated by hypermail 2.1.8 : Mon Oct 31 2005 - 08:15:04 EET