This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Apr 1, 2005 6:52 PM, Paolo Carlini <pcarlini@suse.de> wrote:
> Alexander Terekhov wrote:
> 
> >>*** Alpha ***:
> >>
> >>
> >Well, it looks like mere acquire. See
> >
> >
> Ok, noted. Can I generalize that in glibc we can find the fully-fenced
> implementations of exchange_and_add that we are looking for?

>From alpha/bits/atomic.h:

----
/* ??? Barrier semantics for atomic_exchange_and_add appear to be 
   undefined.  Use full barrier for now, as that's safe.  */
#define atomic_exchange_and_add(mem, value) \
  __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, __MB, __MB)
----

regards,
alexander.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]