Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2000-08-31 11:34:25


--- In boost_at_[hidden], "David Abrahams" <abrahams_at_m...> wrote:
>
> ----- Original Message -----
> From: "William Kempf" <sirwillard_at_m...>
> > > The following Win32 functions don't work right on Win95:
> > >
> > > InterlockedCompareExchange
> > > InterlockedCompareExchangePointer
> > > InterlockedExchangeAdd
> >
> > But they do on Win98. Tricky issue here. I included the
> > compare_exchange() only to bring up debate about its usefulness.
> > I've never found a need for them, but didn't want to eliminate
them
> > just because I've never needed them, nor because Win95 didn't
support
> > them. Obviously they can be added to Win95 in the form of some
> > assembler instructions.
>
> Just an additional data point: if I remember correctly, the
Motorola 680x0,
> where x > 2, includes atomic instructions for linking list elements
in/out
> of singly- and doubly-linked lists! These are called something like
> "Atomic-compare-and-exchange" IIRC.

This is the compare_exchange() I posted and the
InterlockedCompareExchange on Win32. Thanks for explaining it's
usefulness. Now we've got a better place to argue from when deciding
whether or not to retain compare_exchange().

Bill Kempf


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