Falk Hueffner wrote:
Mikael Magnusson <[EMAIL PROTECTED]> writes:

Falk Hueffner wrote:
Hi,
the correct solution is to use __sync_synchronize as fallback, which
is a full memory barrier defined by gcc (starting from 4.1) for all
platforms. It is also desirable to use this on all platforms that
don't differentiate read/write/full barriers, since it gives the
compiler better opportunities to optimize.

Do you have a patch? I tried to use __sync_synchronize on i386, but it
doesn't generate any synchronization code in the assembler output.

Sorry, you need __sync_synchronize(). (Does __sync_synchronize on its
own not generate a warning?)


According to [1]
"gcc does not implement __sync_synchronize() as a full memory barrier on X86, in spite of the documentation."

Do you know what architecture __sync_synchronize() is implemented as a full memory barrier?

PortAudio implements native memory barriers for i386 and powerpc. We can use __sync_synchronize() for other architectures if it's implemented as a full memory barrier on those. Otherwise we need to disable JACK on those architectures (already committed to SVN).

Mikael

[1]http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2047.html


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to