public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/89714] allow for overriding the thread-detection mechanism
       [not found] <bug-89714-4@http.gcc.gnu.org/bugzilla/>
@ 2020-11-23 12:06 ` redi at gcc dot gnu.org
  2020-11-23 12:48 ` tneumann at users dot sourceforge.net
  2020-11-23 15:43 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-23 12:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
-D_GLIBCXX_GTHREAD_USE_WEAK=0 appears to work, but is not officially supported.

It also only affects the code in the libstdc++ headers, not the code inside
libstdc++.so that checks __gthread_active_p.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libgcc/89714] allow for overriding the thread-detection mechanism
       [not found] <bug-89714-4@http.gcc.gnu.org/bugzilla/>
  2020-11-23 12:06 ` [Bug libgcc/89714] allow for overriding the thread-detection mechanism redi at gcc dot gnu.org
@ 2020-11-23 12:48 ` tneumann at users dot sourceforge.net
  2020-11-23 15:43 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: tneumann at users dot sourceforge.net @ 2020-11-23 12:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #3 from Thomas Neumann <tneumann at users dot sourceforge.net> ---
Perhaps the header files could be changed to react to _REENTRANT, as that seems
to be the define that is set by gcc when requesting threading support.

The redundant checks within the shared library are less of an issue. Of course
they waste a few cycles, too, but the unnecessary checks in the header files
are far worse as they are inlined all over the place when using, e.g.,
shared_ptr.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libgcc/89714] allow for overriding the thread-detection mechanism
       [not found] <bug-89714-4@http.gcc.gnu.org/bugzilla/>
  2020-11-23 12:06 ` [Bug libgcc/89714] allow for overriding the thread-detection mechanism redi at gcc dot gnu.org
  2020-11-23 12:48 ` tneumann at users dot sourceforge.net
@ 2020-11-23 15:43 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-23 15:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89714

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That wouldn't help when people link directly with -lpthread rather than
-pthread. _REENTRANT is not required for pthreads, so I don't think we should
depend on it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-23 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-89714-4@http.gcc.gnu.org/bugzilla/>
2020-11-23 12:06 ` [Bug libgcc/89714] allow for overriding the thread-detection mechanism redi at gcc dot gnu.org
2020-11-23 12:48 ` tneumann at users dot sourceforge.net
2020-11-23 15:43 ` redi at gcc dot gnu.org

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).