Re: [LAU] Simple, easy multithreaded circular buffer library for Linux?

From: Tim Blechmann <tim@email-addr-hidden>
Date: Fri Oct 17 2008 - 15:54:30 EEST

>> The Portaudio code looks more and more robust to me. It's also
>> surprisingly short. Maybe that the best would be to replace jack's
>> ringbuffer with it? I think it should be possible to keep the
>> jack_ringbuffer api unchanged.
>
> I'd rather add the memory barriers to the JACK code, but this could be a
> race to see who does what first. A memory barrier is typically single
> instruction. The complication tends to be defining them in a
> sufficiently portable way.

gcc provides built-in memory barriers, which are straight-forward to
use ... beside that, one could use an abstraction layer, providing
assembler code (iirc, portaudio implements memory barriers for multiple
platforms as macros) ...

there is also the atomic_ops project [1], providing atomic operations for
multiple platforms ... it had some issues, when i first tried it two
years ago, but they seem to be resolved now ...

best, tim

[1] http://www.hpl.hp.com/research/linux/atomic_ops/

-- 
tim@email-addr-hidden
http://tim.klingt.org
art is short - life is long
  Jack Kerouac
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Fri Oct 17 16:15:03 2008

This archive was generated by hypermail 2.1.8 : Fri Oct 17 2008 - 16:15:03 EEST