Re: [LAD] Jack midi sequencer, threading and shared state

From: Alexandre DENIS <contact@email-addr-hidden>
Date: Tue Sep 17 2013 - 11:25:27 EEST

On Mon, 16 Sep 2013 18:34:17 -0600
Burkhard Ritter <burkhard@email-addr-hidden> wrote:

> My understanding now is that: 1. Atomicity
> (meaning atomic read and write) in and by itself is not enough. I also
> need to ensure that memory access does not get reordered across my
> atomic reads and writes (so that, for example, I don't happen to
> increase the write counter before the data is actually written to the
> buffer). 2. To ensure atomicity and to enforce these memory barriers I
> always need some (cpu/architecture specific) special instructions.

Hi,

For atomic read/writes, barriers, and other atomic operations,
cpu-specific instructions are not needed anymore. You can use generic
gcc builtins:
http://gcc.gnu.org/onlinedocs/gcc-4.3.5/gcc/Atomic-Builtins.html

-Alexandre.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Sep 17 20:15:02 2013

This archive was generated by hypermail 2.1.8 : Tue Sep 17 2013 - 20:15:02 EEST