[cpp-threads] Implicit Conversion for Atomics

Peter Dimov pdimov at mmltd.net
Tue Jan 29 02:14:16 GMT 2008


>> > Is this indeed true for the seq_cst constraint?
>>
>> Good question.  I don't have an immediate answer.
>>
> It's pretty clearly true on X86 (at least in the absence of SSE, which we 
> still need to understand more completely).  The canonical implementation 
> of SC atomics there is
>
> store -> xchg (includes a fence)
> load -> ordinary load (actually mov)
>
> On Itanium, this is also true:
> store -> st.rel; mf
> load -> ld.acq

In principle, you can go the other way and make the load expensive and the 
store cheaper, although this probably won't make much sense.

Since you're speaking of a canonical implementation, I assume that the 
transitivity question has been resolved?

Do these canonical implementations appear in a document somewhere? 




More information about the cpp-threads mailing list