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

Alexander Terekhov alexander.terekhov@gmail.com
Fri Apr 1 16:46:00 GMT 2005


On Apr 1, 2005 5:26 PM, Peter Dimov <pdimov@mmltd.net> wrote:
[...]
> *** Alpha ***:
> 
> http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/config/cpu/alpha/atomicity.h?rev=1.6&content-type=text/x-cvsweb-markup
> 
> namespace __gnu_cxx
> {
>  _Atomic_word
>  __attribute__ ((__unused__))
>  __exchange_and_add(volatile _Atomic_word* __mem, int __val)
>  {
>    register int __result, __tmp;
> 
>    __asm__ __volatile__ (
>      "\n$Lxadd_%=:\n\t"
>      "ldl_l  %0,%3\n\t"
>      "addl   %0,%4,%1\n\t"
>      "stl_c  %1,%2\n\t"
>      "beq    %1,$Lxadd_%=\n\t"
>      "mb"

Well, it looks like mere acquire. See

http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/alpha/bits/atomic.h?cvsroot=glibc

regards,
alexander.



More information about the Libstdc++ mailing list