Boost logo

Boost :

Subject: Re: [boost] status of sp_counted_base_solaris.hpp
From: Graham Bennett (graham-boost_at_[hidden])
Date: 2011-01-10 17:33:47

On Mon, Jan 10, 2011 at 11:29:06PM +0200, Peter Dimov wrote:
> Graham Bennett wrote:
>> Hi all,
>> I'm interested in getting boost::shared_ptr to use atomic ops on
>> Solaris. I notice there is an implementation using the OS-provided
>> atomics in boost/detail/sp_counted_base_solaris.hpp, but it doesn't
>> seem to be included. According to this thread:
>>, it seems the
>> reason might be that it wasn't possible to come up with a proper
>> preprocessor condition to include it on the right versions of Solaris.
> What implementation does your platform currently pick? There is also
> sp_counted_base_gcc_sparc.hpp, which does use atomic operations.

Hi Peter,

On my platform (Solaris 10 on x86 with Sun Studio 12), it picks
sp_counted_base_spin.hpp. Unfortunately there is no actual spinlock
implementation picked for this platform either, so it ends up with a
plain pthread_mutex_lock/unlock, which is not ideal.

I need to stick with Studio for other reasons, so unfortunately gcc is
not an option.

Thanks for the response,


Graham Bennett

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