Re: threading news
Giorgio <[email protected]>
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/22/2009 05:22 AM, Felix von Leitner wrote: > I just checked in some threading code and probably broke everything. > The new code supports thread local storage (so far only tested on i386 > and amd64), and uses the TLS mechanism to avoid the costly thread self > discovery that the code was doing until now (call getpid and then search > a data structure). If the TLS setup fails (on i386 if you use an old > kernel, presumably), then the code still falls back to the old search > code. > > If you are currently using dietlibc libpthread, you might want to back > up your repository and build dir before updating to see if it still > works for you. On i386 I'm getting a segfault at the end of main that I > hope we'll fix soon. > > Now, the question is: is there even a target audience for using > threading with dietlibc on kernels older than 2.6? Should we maintain > the old horrible threading library or abandon it altogether for a > rewrite supporting all the shiny scalability features from kernel 2.6 > onwards? That would clean up things considerably and reduce code size > dramatically, too. > > Please note that thread local storage only works for static binaries. > There is a PDF explaining how to do it for dynamic binaries. That PDF > is bigger than the current dietlibc tarball. I'm NEVER going to > implement that. If you need TLS and shared libraries, use glibc. :-) > > Felix OK for both these two, I'm also living on the bleeding edge (of the kernel). When I'll be back at work I will test the new code on an arm EABI platform. giorgio - -- Giorgio, [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkptiAwACgkQYqbc2h3T5VDmhwCgln/7IfR6DmZHUKcURIblpPTH pLoAn3rqdlzYJ/4nHEn0mWCScHYx4+kK =bep0 -----END PGP SIGNATURE-----