Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2008-04-09 19:10:11


Peter Dimov wrote:
> What happens when you change...
>
>> bool try_lock()
>> {
>> int r;
>>
>> __asm__ __volatile__(
>> "swp %0, %1, [%2]":
>> "=r"( r ): // outputs
>
> ... this line to
>
> "=&r"( r ): // outputs

Bingo!

====
coda$ ./spinlock_test
// sp.lock();
// sp2.lock();
// sp.unlock();
// sp2.unlock();
// scoped_lock...
// ...scoped_lock
coda$
====

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

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