forked from boostorg/smart_ptr
Detabified.
[SVN r29039]
This commit is contained in:
@ -34,8 +34,8 @@ inline void atomic_increment( long * pw )
|
|||||||
// release barrier associated with it. We choose release as it should be
|
// release barrier associated with it. We choose release as it should be
|
||||||
// cheaper.
|
// cheaper.
|
||||||
__asm__ ("fetchadd8.rel %0=[%2],1" :
|
__asm__ ("fetchadd8.rel %0=[%2],1" :
|
||||||
"=r"(tmp), "=m"(*pw) :
|
"=r"(tmp), "=m"(*pw) :
|
||||||
"r"(pw));
|
"r"(pw));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline long atomic_decrement( long * pw )
|
inline long atomic_decrement( long * pw )
|
||||||
@ -62,18 +62,18 @@ inline long atomic_conditional_increment( long * pw )
|
|||||||
long rv, tmp, tmp2;
|
long rv, tmp, tmp2;
|
||||||
|
|
||||||
__asm__ ("0: ld8 %0=[%4] ;; \n"
|
__asm__ ("0: ld8 %0=[%4] ;; \n"
|
||||||
" cmp.eq p7,p0=0,%0 ;; \n"
|
" cmp.eq p7,p0=0,%0 ;; \n"
|
||||||
"(p7) br.cond.spnt 1f \n"
|
"(p7) br.cond.spnt 1f \n"
|
||||||
" mov ar.ccv=%0 \n"
|
" mov ar.ccv=%0 \n"
|
||||||
" add %1=1,%0 ;; \n"
|
" add %1=1,%0 ;; \n"
|
||||||
" cmpxchg8.acq %2=[%4],%1,ar.ccv ;; \n"
|
" cmpxchg8.acq %2=[%4],%1,ar.ccv ;; \n"
|
||||||
" cmp.ne p7,p0=%0,%2 ;; \n"
|
" cmp.ne p7,p0=%0,%2 ;; \n"
|
||||||
"(p7) br.cond.spnt 0b \n"
|
"(p7) br.cond.spnt 0b \n"
|
||||||
" mov %0=%1 ;; \n"
|
" mov %0=%1 ;; \n"
|
||||||
"1:" :
|
"1:" :
|
||||||
"=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) :
|
"=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) :
|
||||||
"r"(pw) :
|
"r"(pw) :
|
||||||
"ar.ccv", "p7");
|
"ar.ccv", "p7");
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,10 @@ public:
|
|||||||
void release() // nothrow
|
void release() // nothrow
|
||||||
{
|
{
|
||||||
if( --use_count_ == 0 )
|
if( --use_count_ == 0 )
|
||||||
{
|
{
|
||||||
dispose();
|
dispose();
|
||||||
weak_release();
|
weak_release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void weak_add_ref() // nothrow
|
void weak_add_ref() // nothrow
|
||||||
|
Reference in New Issue
Block a user