public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* __librt_multiple_threads for nptl?
@ 2005-02-07  8:46 Alexandre Oliva
  2005-02-07 19:32 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 2005-02-07  8:46 UTC (permalink / raw)
  To: libc-hacker

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

No current ports need this (not even the FR-V port, that has recently
been converted to use info from the TCB instead of relying on this
global var), but it was surprising to me that any DTV_AT_TP port is
now required to use this trick.  It sure is a tiny little bit more
efficient for uses within librt, but what if it required an ABI
change?

I was a bit concerned about breaking ABI compatibility changing FR-V
to use multiple_threads in the TCB, as opposed to using this
variable, but I'm now convinced it's not an issue.  Am I mistake?

Anyhow, how about installing this patch, or at least enabling a port
to define some macro to get this variable defined in librt?  Some mq
functions definitely need it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: glibc-nptl-librt-multiple-threads.patch --]
[-- Type: text/x-patch, Size: 1298 bytes --]

Index: nptl/ChangeLog
2005-02-03  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/unix/sysv/linux/libc_multiple_threads.c
	(__librt_multiple_threads): Alias to __libc_multiple_threads.
	* Versions: Export it from libc.so as GLIBC_PRIVATE.

Index: nptl/Versions
--- nptl/Versions	2004-12-05 00:18:42.000000000 -0200
+++ nptl/Versions	2005-02-03 08:54:51.000000000 -0200
@@ -29,6 +29,7 @@
   GLIBC_PRIVATE {
     # Internal libc interface to libpthread
     __libc_dl_error_tsd;
+    __librt_multiple_threads;
   }
 }
 
Index: nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c
--- nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c	2003-03-12 22:49:25.000000000 -0300
+++ nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c	2005-02-03 07:09:23.000000000 -0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -21,6 +21,7 @@
 
 #ifndef NOT_IN_libc
 # ifndef TLS_MULTIPLE_THREADS_IN_TCB
-int __libc_multiple_threads attribute_hidden;
+int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
+strong_alias (__libc_multiple_threads, __librt_multiple_threads);
 # endif
 #endif

[-- Attachment #3: Type: text/plain, Size: 188 bytes --]


-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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

* Re: __librt_multiple_threads for nptl?
  2005-02-07  8:46 __librt_multiple_threads for nptl? Alexandre Oliva
@ 2005-02-07 19:32 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2005-02-07 19:32 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: libc-hacker

> I was a bit concerned about breaking ABI compatibility changing FR-V
> to use multiple_threads in the TCB, as opposed to using this
> variable, but I'm now convinced it's not an issue.  Am I mistake?

You are talking about the private TCB contents.  That is not part of any
ABI except the GLIBC_PRIVATE interface between libc/ld.so/librt.
We don't consider that an ABI change.

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

end of thread, other threads:[~2005-02-07 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-07  8:46 __librt_multiple_threads for nptl? Alexandre Oliva
2005-02-07 19:32 ` Roland McGrath

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