
7 Apr
2005
7 Apr
'05
12:58 p.m.
Peter Dimov wrote: [...]
------------------------------------------------------------------------ Name: sp_counted_base_gcc_ia64.hpp sp_counted_base_gcc_ia64.hpp Type: Plain Text (text/plain) Encoding: 7bit
: inline void atomic_increment( long * pw ) : { : // ++*pw; : : long tmp; : : __asm__ ("fetchaddl %0=[%2],1" : : "=r"(tmp), "=m"(*pw) : : "r"(pw) : : ); : } That's implicit .acq by default, right? Release incarnation is probably better. It merely "delays" increment and doesn't hinder value prediction for subsequent loads and other speculative stuff for "all" subsequent operations. regards, alexander.