Boost logo

Boost :

Subject: Re: [boost] boost.atomic and boost.lockfree backports
From: Cory Nelson (phrosty_at_[hidden])
Date: 2011-05-30 11:17:51


On Mon, May 30, 2011 at 6:26 AM, Tim Blechmann <tim_at_[hidden]> wrote:
> * afaict, the dequeue will only be lockfree on non-ancient x86-64 architectures,
> supporting 16byte CAS ... no ppc/x86 ... probably no mips/alpha. therefore a
> fixed-sized version of the algorithm will probably be very useful, using integer
> indices instead of pointers ...

At least on Windows, you can use the high 20 bits of a 64-bit pointer
as an ABA counter. This is what Windows' own lock-free stack
(InterlockedPushEntrySList) does. Even so, a fixed-size version of
the algorithm would still have its uses.

-- 
Cory Nelson
http://int64.org

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