Java: add flag_use_atomic_builtins

David Daney ddaney@caviumnetworks.com
Wed Aug 12 19:00:00 GMT 2009


Boehm, Hans wrote:
> [Partially replying to myself]
>> From:  Boehm, Hans
>>
>> At the risk of asking a stupid question, shouldn't all the 
>> code inside gcc gradually migrate towards using the C++0x 
>> (and probably C1x) atomics, which seem to be generally 
>> supported by gcc 4.4?
>>
>> There are known issues with __sync (no atomic loads and 
>> stores, underspecified ordering), which is why there wasn't 
>> much of an effort topush the __sync interface into C++0x.
>>
>> Hans
>>
> OK.  That was largely a stupid question, since we're talking about the compiler implementation of those primitives, which presumably are shared with the atomic<T> implementation?
> 

The generic implementation uses __sync*, but some individual targets 
have hand coded asm blocks.

David Daney



More information about the Java-patches mailing list