Boost logo

Boost :

From: Chris Thomasson (cristom_at_[hidden])
Date: 2006-11-14 20:22:15

"Roland Schwarz" <roland.schwarz_at_[hidden]> wrote in message
> Neal Becker wrote:
>> Perhaps of some interest:
> You might also look at:
> Hans Boehm's proposal seems to build upon this library you
> were pointing at. (Not surprisingly, since he is the author of it.)
> I am currently trying to prototype something along his proposal, to
> see how far I can get.
> Until now I have found some loopholes I am trying to figure out.

Here is how I define rules for my atomic<T>:

Can't use any constructors, destructors, base classes, virtual functions,
or anything else that violates POD requirements.

Can't use any operators

Atomic operation API must have static interface that operates on pointers to
T as the destination of any operation. Usage is like:

static foo s_foo = 0;
typedef atomic<foo> atomic_foo_t;

void something() {
  atomic_foo_t::cas<mb::storeload>(&s_foo, 0, 5);

Any thoughts on this approach?

Boost list run by bdawes at, gregod at, cpdaniel at, john at