On Tue, 2009-09-01 at 21:51 +0300, Peter Dimov wrote: Hello Peter,
from looking at [1] i understood that there is no lock-free implementation of shared_ptrs on solaris.
It depends on the compiler and CPU. There are lock-free implementations for g++ on x86/x64 and Sparc. See sp_counted_base.hpp for the details.
I forgot to mention that i am using Sun Studio...
When snooping around in the source i noticed that there is a ./smart_ptr/detail/atomic_count_solaris.hpp It is using the solaris specific
to implement an atomic counter. frank@dexter:~/boost_1_40_0/boost$ find -type f | xargs grep atomic_count_solaris.hpp ./smart_ptr/detail/atomic_count_solaris.hpp:// boost/detail/atomic_count_solaris.hpp
But apparently it is not in use. I am currently wondering why?
I don't remember the exact reason. We probably couldn't figure out a way to reliably detect Solaris.
Hmm, that is a pity. Do you see any reason why i shouldn't modify my local copy of boost to use boost/detail/atomic_count_solaris.hpp on sun studio/solaris? Thank you for your advice! KR, Frank