This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2005 10:53:17 -0000
- Subject: [Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications
- References: <bug-24704-7094@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from pcarlini at suse dot de 2005-11-08 10:53 -------
(In reply to comment #10)
> An easy solution might be to check for __gthread_active_p() in
> bits/basic_string before calling __exchange_and_add, and to do this locally and
> non-atomically otherwise.
Yes, this solution can work. Actually, I'm hoping for something a bit cleaner.
Remember that we want a single clean solution for *all* the places where the
atomics are used and most are inside the built *.so.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.3 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24704