threading news
Felix von Leitner <[email protected]>
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
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