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: libstdc++/5037: Multithreaded read access to strings not threadsafeon Solaris/Sparc


I am wondering what are the reason(s) for using a spin lock instead of a
cas instruction on to make the string ref count thread safe on Sparc v9.
Won't there be contention for this lock ? Sun's technical paper suggests
that cas is better when the number of threads is greater than the number
of cpus, which is not uncommon in MT programs.  Also, doesn't this
restrict the usability of the atomicity methods since use in other classes
could make contention worse ?

here is the sun article 

http://soldc.sun.com/articles/stl-new.html

Stuart Brown
sbrown@inforonics.com




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