Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-09 18:43:15


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

?

> "r"( 1 ), "r"( &v_ ): // inputs
> "memory", "cc" );
>
> return r == 0;
> }


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