Boost logo

Boost Users :

Subject: Re: [Boost-users] lock-free shared_ptr on solaris
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-09-01 14:51:27


Frank Meerkötter wrote:
> Hello,
>
> 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.

> 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 <atomic.h> to implement an
> atomic counter.
>
> frank_at_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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net