Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-07-08 13:50:29


Michael van der Westhuizen wrote:

>> inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_,
>> int32_t swap_ )
>> {
>> __asm__ __volatile__( "cas %0, %2, %1"
>> : "+m" (*dest_), "+r" (swap_)
>> : "r" (compare_)
>> : "memory" );
>>
>> return swap_;
>> }
>
> I've just tested with the above code, and it works perfectly. Test
> results below.

Great! Added to CVS, let's hope that I haven't broken anything in the final
round.

Regarding the Solaris situation, perhaps we need to just depend on the
user-specified BOOST_USE_SOLARIS_ATOMICS for now? Has Solaris 5.11 been
officially released?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk