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

From: Burkhard Ritter <burkhard@email-addr-hidden>
Date: Tue Sep 17 2013 - 21:34:11 EEST

On Tue, Sep 17, 2013 at 2:25 AM, Alexandre DENIS
<contact@email-addr-hidden> wrote:
> 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.

Hi Alexandre,

what I meant was that somewhere along the compiler chain cpu-specific
instructions need to be generated. I think glib provides the
functionality. I didn't know about the GCC builtins you mention, but
it looks to me like they are superseded by C++11's atomic types [1].

When I originally started looking into atomicity I thought it would be
enough to use a (architecture specific) data type size which would be
written and read atomically. However, that's not correct. (Also,
initially I wasn't aware I need some sort of memory barrier.)

Cheers,
Burkhard

[1] http://www.cplusplus.com/reference/atomic/atomic/
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Sep 18 08:15:01 2013

This archive was generated by hypermail 2.1.8 : Wed Sep 18 2013 - 08:15:01 EEST