mailing list of musl libc
 help / color / mirror / code / Atom feed
* TLS (thread-local storage) support
@ 2012-10-04 21:13 Rich Felker
  2012-10-04 21:29 ` Daniel Cegiełka
  2012-10-05  3:04 ` Rich Felker
  0 siblings, 2 replies; 26+ messages in thread
From: Rich Felker @ 2012-10-04 21:13 UTC (permalink / raw)
  To: musl

Hi,

I've committed the initial version of thread-local storage
(__thread/_Thread_local keyword). So far, it only works in
static-linked applications, and might or might not be working properly
on arm, mips, and microblaze. The latter is a matter of whether these
archs need "TLS variant I" instead of the much cleaner/saner "variant
II" used by i386 and x86_64; unfortunately, Drepper's paper on TLS ABI
omits most of the interesting archs in favor of dying or dead ones
like Itanium, so I'm going to have to dig into other sources to find
out if musl needs to special-case any or all of these.

I also have the design for dynamic-linked TLS mostly worked out, but
need to make some changes to the dynamic linker to get it integrated.
Should be coming soon.

Reports of success or problems encountered are welcome, especially on
non-x86 archs, would be interesting/welcome.

Note that if you've been building gcc with --disable-tls, __thread was
already working but gets emulated (very poorly; it's slow and will
abort() if it runs out of memory) through libgcc. Such compilers are
useless for testing the new real TLS support, so rebuild without
--disable-tls if needed before testing.

Rich


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

end of thread, other threads:[~2012-10-19 18:41 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 21:13 TLS (thread-local storage) support Rich Felker
2012-10-04 21:29 ` Daniel Cegiełka
2012-10-04 22:36   ` Rich Felker
2012-10-06  8:17     ` Daniel Cegiełka
2012-10-16 21:27       ` boris brezillon
2012-10-16 21:47         ` boris brezillon
2012-10-16 22:09           ` Szabolcs Nagy
2012-10-16 23:16             ` boris brezillon
2012-10-17 10:37               ` Szabolcs Nagy
2012-10-16 23:29             ` Rich Felker
2012-10-16 22:54           ` Rich Felker
2012-10-16 23:39             ` boris brezillon
2012-10-16 23:48               ` Rich Felker
2012-10-17  0:08                 ` boris brezillon
2012-10-17  0:42                   ` Rich Felker
2012-10-17  1:03                     ` boris brezillon
2012-10-17  1:49                     ` boris brezillon
2012-10-17  1:58                       ` Rich Felker
2012-10-17  7:48                         ` musl
2012-10-19 18:39           ` orc
2012-10-19 18:41             ` Rich Felker
2012-10-05  3:04 ` Rich Felker
2012-10-05 17:27   ` Rich Felker
2012-10-06 14:33     ` Szabolcs Nagy
2012-10-06 20:39       ` Szabolcs Nagy
2012-10-06 20:58         ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).