Peter Dimov | 1 Apr 2005 17:31

Re: Fw: [patch] Make std::tr1::shared_ptr thread-safe.

Alexander Terekhov wrote:
> On Apr 1, 2005 4:51 PM, Paolo Carlini <pcarlini <at> suse.de> wrote:
[...]
>>  { return __sync_fetch_and_add(__mem, __val); }
>
> Show me assembly, please.

You don't need assembly in this specific case. <ia64intrin.h> intrinsics are 
"as if" fully fenced IIUC. I think that the idea is for the compiler to 
treat them as PL2 "sync" labels. But I may be wrong, of course. 


Gmane