|
Message-ID: <20121004211332.GA12874@brightrain.aerifal.cx> Date: Thu, 4 Oct 2012 17:13:32 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: TLS (thread-local storage) support 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.