Boost logo

Boost :

From: Chris Thomasson (cristom_at_[hidden])
Date: 2006-10-24 19:33:11


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:002b01c6f7c2$17116590$6607a8c0_at_pdimov2...
> Chris Thomasson wrote:
>> "Peter Dimov" <pdimov_at_[hidden]> wrote in message
>> news:001801c6f7bd$c32f62a0$6607a8c0_at_pdimov2...
>>> Chris Thomasson wrote:
>>>
>>>> How does the original algorithm compare to yours?
>>>
>>> I haven't tried it yet. Will do.
>>
>> Humm...
>
> Hmmm. Doesn't seem to work. What does your dwcas return on success in
> &cmp?
> Leaves it unchanged, perhaps? I always return the current value of &mtx
> there and it seems that your code depends on &cmp only changing if the
> dwcas
> fails.

I am using an IBM-Style CAS:

http://groups.google.com/group/comp.programming.threads/msg/bf68fe51225f1cbb
http://groups.google.com/group/comp.programming.threads/msg/b64b2419a6b05bb6

it updates the comprand and returns non-zero on failure. Here is exactly how
its implemented; look at the very first function in this file:

http://appcore.home.comcast.net/appcore/src/cpu/i686/ac_i686_mingw_asm.html

or MASM

http://appcore.home.comcast.net/appcore/src/cpu/i686/ac_i686_masm_asm.html

Does that clear some things up?


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