This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications



------- Comment #23 from pcarlini at suse dot de  2006-05-22 08:54 -------
(In reply to comment #22)

> This would mean a non-enable-threads compiled libstdc++ would skip the calls
> to __exchange_and_add?

Of course the idea would not be that of "skipping", instead providing a version
of __exchange_and_add not using slow atomics and inlined.

> And to clarify, there would be no other way to skip these calls except
> making a separate non-threaded libstdc++?

Yes. At least for this PR. If you can provide compelling experimental evidence
that normal users can pay the overhead of checking each __gthread_active_p()
each time, then we could reconsider that, in a *separate* PR. Also, since we
are moving anyway to not-reference-counted strings (already provided in ext/),
there is not much point for more invasive and complex changes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24704


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