[LAD] Jack midi sequencer, threading and shared state
Alexandre DENIS
contact at alexandredenis.net
Tue Sep 17 08:25:27 UTC 2013
On Mon, 16 Sep 2013 18:34:17 -0600
Burkhard Ritter <burkhard at ualberta.ca> 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.
More information about the Linux-audio-dev
mailing list