public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications
Date: Tue, 08 Nov 2005 11:50:00 -0000	[thread overview]
Message-ID: <20051108115023.6543.qmail@sourceware.org> (raw)
In-Reply-To: <bug-24704-7094@http.gcc.gnu.org/bugzilla/>



------- Comment #14 from pcarlini at suse dot de  2005-11-08 11:50 -------
(In reply to comment #13)

> Indeed, other parts of libstdc++ already rely on __gthread_active_p(). 

Sure, see mt_alloc: there is an external __GTHREADS and an internal
__gthread_active_p().

> Using __GTHREADS would get us halfway, but nobody in his right mind
> (certainly no distributor) is going to compile with --enable-threads=single
> on a platform that does posix - you get a crippled compiler. I'd hate to
> have to keep two compilers around.

This is meaningless. The configure option is present and has to be used
consistently in the whole library. Again, see mt_alloc.

> I've verified that adding a check on __gthread_active_p() to
> bits/basic_string.h does the right thing. It only does so after a complete
> recompile of libstdc++ though, the code is indeed instantiated earlier (as
> you mentioned already).

Of course does the right thing, there is no doubt about this. But, again,
it's inconsistent and ugly adding conditionals all around only in basic_string
and not touching all the other places. We simply want to do the same thing
that mt_alloc is already doing, centralized in one place.


-- 


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


  parent reply	other threads:[~2005-11-08 11:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07 11:37 [Bug libstdc++/24704] New: __gnu_cxx::__exchange_and_add is out of line and called even for single threaded applications using std::string ahu at ds9a dot nl
2005-11-07 12:39 ` [Bug libstdc++/24704] " ahu at ds9a dot nl
2005-11-07 15:15 ` neroden at gcc dot gnu dot org
2005-11-07 17:00 ` ahu at ds9a dot nl
2005-11-07 17:05 ` pinskia at gcc dot gnu dot org
2005-11-07 17:06 ` [Bug libstdc++/24704] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-11-07 17:08 ` [Bug libstdc++/24704] [3.4/4.0/4.1 " pcarlini at suse dot de
2005-11-07 17:32 ` pinskia at gcc dot gnu dot org
2005-11-07 17:36 ` pcarlini at suse dot de
2005-11-07 17:38 ` pinskia at gcc dot gnu dot org
2005-11-07 23:07 ` [Bug libstdc++/24704] __gnu_cxx::__exchange_and_add is called even for single threaded applications pcarlini at suse dot de
2005-11-08 10:16 ` ahu at ds9a dot nl
2005-11-08 10:53 ` pcarlini at suse dot de
2005-11-08 11:30 ` pcarlini at suse dot de
2005-11-08 11:43 ` bert dot hubert at netherlabs dot nl
2005-11-08 11:50 ` pcarlini at suse dot de [this message]
2005-11-08 11:58 ` bert dot hubert at netherlabs dot nl
2005-11-08 12:06 ` pcarlini at suse dot de
2005-11-08 14:26 ` bert dot hubert at netherlabs dot nl
2005-11-08 14:35 ` pcarlini at suse dot de
2005-11-08 14:54 ` pcarlini at suse dot de
2006-05-21 20:15 ` pinskia at gcc dot gnu dot org
2006-05-21 20:29 ` pcarlini at suse dot de
2006-05-22  5:20 ` bert dot hubert at netherlabs dot nl
2006-05-22  8:55 ` pcarlini at suse dot de
2006-05-22 14:44 ` pcarlini at suse dot de
2006-05-24 16:38 ` paolo at gcc dot gnu dot org
2006-05-24 16:42 ` pcarlini at suse dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051108115023.6543.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).