
On Tue, Jan 11, 2011 at 12:48:44AM +0200, Peter Dimov wrote:
Graham Bennett wrote:
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.
Well, in that case, to get back to your original question - sp_counted_base_solaris.hpp should work, as far as I know; the only reason for not using it is that we've been unable to come up with the proper preprocessor code for including it. There are multithreaded tests in libs/smart_ptr/test - shared_ptr_mt_test, weak_ptr_mt_test - that you can run (in addition to the rest) as a sanity check.
I've given the unit tests a try, and unfortunately there are a lot of test failures with sp_counted_base_solaris.hpp enabled (shared_ptr_test, smart_ptr_test, weak_ptr_mt_test etc.). I get no failures with the original implementation. I will take a look to see if I can see anything obvious that would be causing the problems. cheers, Graham -- Graham Bennett