public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/14304] New: Provide some parts of librt in libc as well
@ 2012-06-27 15:00 ajax at redhat dot com
  2013-01-15 14:35 ` [Bug nptl/14304] " schwab@linux-m68k.org
  2014-06-18  4:31 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: ajax at redhat dot com @ 2012-06-27 15:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14304

             Bug #: 14304
           Summary: Provide some parts of librt in libc as well
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: nptl
        AssignedTo: unassigned@sourceware.org
        ReportedBy: ajax@redhat.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


librt links against libpthread, mostly because aio_* are implemented in threads
instead of in the kernel AFAICT.  This is unfortunate, because many libraries
would like to use (for example) clock_gettime, but doing so pulls in pthreads. 
Now you have no choice but to hit the more expensive thread-safe paths, because
your library can't know whether multiple threads actually exist, only whether
the pthread symbols are non-zero.

The complementary problem also exists for applications that are unthreaded: if
they link against librt, pthread symbols will be non-zero, and any thread-safe
library beneath that app now has to behave thread-safely.

This is especially comic when reading the clock_gettime implementation, which
goes out of its way to work correctly regardless of whether
__pthread_clock_gettime is available.

Ideally it would be possible to provide most of these symbols from libc
directly (presumably versioned so the app requires a sufficiently new libc).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-18  4:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 15:00 [Bug nptl/14304] New: Provide some parts of librt in libc as well ajax at redhat dot com
2013-01-15 14:35 ` [Bug nptl/14304] " schwab@linux-m68k.org
2014-06-18  4:31 ` fweimer at redhat dot com

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