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

Lee Revell rlrevell at joe-job.com
Wed Dec 7 18:13:07 UTC 2005


On Wed, 2005-12-07 at 09:30 +0100, Stéphane Letz wrote:
> Le 7 déc. 05 à 02:00, Lee Revell a écrit :
> 
> > On Wed, 2005-11-02 at 11:48 +0100, Florian Schmidt wrote:
> >> On Wed, 2 Nov 2005 11:05:34 +0100
> >> Stéphane Letz <letz at grame.fr> wrote:
> >>
> >>> In Jackdmp we have tested 2 system for inter-process  
> >>> synchronization:
> >>> fifo (the way it was done in regular jackd) and POSIX named  
> >>> semaphore
> >>> (which are built on top of futex on recent system version)
> >>>
> >>> In both cases, each already running client get access to the
> >>> synchronization primitive (fifo or POSIX named sema) defined by a  
> >>> new
> >>> coming client. The synchronization primitive is "opened" once when a
> >>> new client appears and is "closed" when the client quits. The
> >>> synchronization primitive that has to be signaled then depends of  
> >>> the
> >>> graph topology.
> >>>
> >>>> But ISTR that OSX only has named shared futexes (i.e. accessed
> >>>> via a file descriptor), and then of course the problem remains.
> >>>
> >>> On OSX, on can use Mach semaphore (internal and non portable...)
> >>> POSIX named semaphore or fifo.
> >>>
> >>> Stephane
> >>
> >> What results did you get? Did the semaphore perform better/worse than
> >> the fifo? What about pthread condition variables with pshared flag  
> >> set?
> >> I read somewhere it should be implemented by now (at least on 2.6
> >> systems).
> >
> > I've tested process shared mutexes/CVs with NPTL 2.3.5 on Linux 2.6  
> > and
> > it works perfectly - I'm able to synchronize multiple processes via a
> > mutex/CV residing in shared memory, backed by an mmap'ed file in /tmp.
> 
> Do you have any test code you could share?
> 
> 

Sorry I can't share the code as it belongs to my employer.  But I based
it on the "Interprocess Locking" example in this Solaris man page:

http://www.scit.wlv.ac.uk/cgi-bin/mansec?3T+mutex_lock

Lee




More information about the Linux-audio-dev mailing list