forked from boostorg/smart_ptr
@ -30,9 +30,9 @@ namespace detail
|
|||||||
|
|
||||||
inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )
|
inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )
|
||||||
{
|
{
|
||||||
__asm__ __volatile__( "cas %0, %2, %1"
|
__asm__ __volatile__( "cas [%1], %2, %0"
|
||||||
: "+m" (*dest_), "+r" (swap_)
|
: "+r" (swap_)
|
||||||
: "r" (compare_)
|
: "r" (dest_), "r" (compare_)
|
||||||
: "memory" );
|
: "memory" );
|
||||||
|
|
||||||
return swap_;
|
return swap_;
|
||||||
|
Reference in New Issue
Block a user