This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3 patch] Add std::tr1::shared_ptr


This looks great Jonathan.

> There are no tests for weak_ptr and incomplete tests for shared_ptr,
> I'll add them eventually but don't have enough time to do it right now.

Sounds acceptable to me. FYI, you shouldn't need to key off of __EXCEPTIONS in the individual testsuite files.

All you need to do is make sure -fno-exceptions compiles cleanly. (It
looks like you've tested this. Am I correct?)

> I have modified the relevant Boost tests to use the std::tr1::shared_ptr
> instead of boost::shared_ptr and run them successfully, but only on a
> single processor machine.  The threaded tests should be run on as many
> exotic multiprocessor machines as possible, as one of the major changes
> I made to the classes was to use GCC's atomic ops instead of the
> Boost.Threads library.  I can't commit those tests but I'll make them
> available to those who want them.

Can you post them after you check this in?

> For the shared_ptr_timing_test my modified versions did better without
> optimisation, but worse when optimisation was enabled.  I plan to
> investigate that at some point.  It might be because the Boost.Threads
> locks can be inlined whereas GCC's atomic ops will make a function call.

That would be interesting to figure out.

> I expect there will be plenty of changes to come but this should
> probably be committed now and improved later. OK for mainline?

Sounds like a great plan. Please check this in to mainline.

best,
benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]