|
Boost : |
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2005-04-06 10:50:47
Peter Dimov wrote:
[...]
> we'll probably see a bigger hit on a dual PPC.
Try on it something along the lines of
asm long atomic_decrement_weak( register long * pw ) {
<load-UNreserved>
<add -1>
<branch if zero to acquire>
{lw}sync
loop:
<load-reserved>
<add -1>
<branch if zero to acquire>
<store-conditional>
<branch if failed to loop else to done>
acquire:
isync
done:
<...>
}
regards,
alexander.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk