From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-11-18 19:11:30
Alexander Terekhov wrote:
>>>> multithreaded environments. It looked like
>>>> shared_count_x86_exp2.cpp coudn't run on multiple platforms.
>>> Yeah. refcount<> (and compilers with not-rocket-science knowledge
>>> of atomics with "hoist" and "sink" barriers... and that's no matter
>>> how screwed is the hardware -- compilers may reorder "as well") is
>>> the way to go. I guess.
>> Before going further with those issues I would like to specify that
>> most of the time we do not need to know the content of the integer;
>> we only need to know whether it is null or not atomically... the
>> machine instructions "dec [counter]" immediately followed by "jne"
>> do that.
> You don't really need "portable asm" for that. C++ aside for a moment,
Thanks, I was not aware. Time to drive some Ferrari...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk