Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-21 11:45:39


From: "Rene Jager" <renej_at_[hidden]>
> ok, but I think it is important to consider what is at least available as
"atomic"
> instructions
> (dec_and_test, and alike) on platforms and what is at most necessary to
implement an
> atomic counter for refererence counting purposes; otherwise enhancements
by others
> can become "impossible" on some platforms (compiler/processor arch/etc)
when
> operations are needed not provided on a specific platform

Yes, you're right, atomic_dec_and_test returns a bool. Consider the spec
changed to return zero if the result is zero, an unspecified non-zero value
otherwise.

--
Peter Dimov
Multi Media Ltd.

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