Boost logo

Boost :

Subject: Re: [boost] boost.atomic and boost.lockfree backports
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-05-30 11:42:55


> > * 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.

:) ... this algorithm requires two pointer/tag pairs and a 3-state enum to be
accessed atomically

-- 
tim_at_[hidden]
http://tim.klingt.org
There's no such entity as "most people". These are generalities. All
generalities are meaningless. You've got to pin it down to a specific
person doing a specific thing at a specific time and space.
  William S. Burroughs



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